Class OffsetVectorReader

All Implemented Interfaces:
ColumnReader, ReaderEvents, ScalarReader

public class OffsetVectorReader extends BaseScalarReader.BaseFixedWidthReader
Reader for an offset vector.
  • Constructor Details

    • OffsetVectorReader

      public OffsetVectorReader(VectorAccessor offsetsAccessor)
  • Method Details

    • valueType

      public ValueType valueType()
      Description copied from interface: ScalarReader
      Describe the type of the value. This is a compression of the value vector type: it describes which method will return the vector value.
      Returns:
      the value type which indicates which get method is valid for the column
    • width

      public int width()
      Specified by:
      width in class BaseScalarReader.BaseFixedWidthReader
    • getEntry

      public long getEntry()
      Return the offset and length of a value encoded as a long. The value is encoded to avoid the need to resolve the offset vector twice per value.
      Returns:
      a long with the format:
      Upper 32 bits - offset: offset = (int) (entry >> 32)
      Lower 32 bits - length: length = (int) (entry & 0xFFFF_FFFF)
    • reposition

      public void reposition()
      Specified by:
      reposition in interface ReaderEvents
      Overrides:
      reposition in class AbstractScalarReader
    • schema

      public ColumnMetadata schema()
      Specified by:
      schema in interface ColumnReader
      Overrides:
      schema in class BaseScalarReader