Interface ColumnReader

All Known Subinterfaces:
ArrayReader, DictReader, ObjectReader, RowSetReader, ScalarReader, TupleReader, VariantReader
All Known Implementing Classes:
AbstractObjectReader, AbstractScalarReader, AbstractScalarReader.NullReader, AbstractScalarReader.ScalarObjectReader, AbstractTupleReader, AbstractTupleReader.TupleObjectReader, ArrayReaderImpl, ArrayReaderImpl.ArrayObjectReader, BaseScalarReader, BaseScalarReader.BaseFixedWidthReader, BaseScalarReader.BaseVarWidthReader, BitColumnReader, ColumnAccessors.BigIntColumnReader, ColumnAccessors.DateColumnReader, ColumnAccessors.Decimal18ColumnReader, ColumnAccessors.Decimal28SparseColumnReader, ColumnAccessors.Decimal38SparseColumnReader, ColumnAccessors.Decimal9ColumnReader, ColumnAccessors.Float4ColumnReader, ColumnAccessors.Float8ColumnReader, ColumnAccessors.IntColumnReader, ColumnAccessors.IntervalColumnReader, ColumnAccessors.IntervalDayColumnReader, ColumnAccessors.IntervalYearColumnReader, ColumnAccessors.SmallIntColumnReader, ColumnAccessors.TimeColumnReader, ColumnAccessors.TimeStampColumnReader, ColumnAccessors.TinyIntColumnReader, ColumnAccessors.UInt1ColumnReader, ColumnAccessors.UInt2ColumnReader, ColumnAccessors.UInt4ColumnReader, ColumnAccessors.UInt8ColumnReader, ColumnAccessors.Var16CharColumnReader, ColumnAccessors.VarBinaryColumnReader, ColumnAccessors.VarCharColumnReader, ColumnAccessors.VarDecimalColumnReader, DictEntryReader, DictReaderImpl, DictReaderImpl.DictObjectReader, MapReader, OffsetVectorReader, RowSetReaderImpl, UnionReaderImpl, UnionReaderImpl.UnionObjectReader

public interface ColumnReader
Base interface for all column readers, defining a generic set of methods that all readers provide. In particular, given the metadata and the object type, one can determine what to do with each reader when working with readers generically. The getObject() and getAsString() methods provide generic data access for tests and debugging.
  • Method Details

    • schema

      ColumnMetadata schema()
    • type

      ObjectType type()
      The type of this reader.
      Returns:
      type of reader
    • isNull

      boolean isNull()
      Determine if this value is null.
      • Nullable scalar: determine if the value is null.
      • Non-nullable scalar: always returns false.
      • Arrays: always returns false</tt.>
      • Lists: determine if the list for the current row is null. In a list, an array entry can be null, empty, or can contain items. In repeated types, the array itself is never null. If the array is null, then it implicitly has no entries.
      • Map or Repeated Map: Always returns false.
      • Map inside a union, or in a list that contains a union, the tuple itself can be null.
      • Union: Determine if the current value is null. Null values have no type and no associated reader.
      Returns:
      true if this value is null; false otherwise
    • getObject

      Object getObject()
      Return the value of the underlying data as a Java object. Primarily for testing
      • Array: Return the entire array as an List of objects. Note, even if the array is scalar, the elements are still returned as a list.
      Returns:
      the value as a Java object
    • getAsString

      String getAsString()
      Return the entire object as a string. Primarily for debugging.
      Returns:
      string representation of the object