Interface ColumnReader

All Known Implementing Classes:
ColumnReaderImpl

public interface ColumnReader
Reader for (repetition level, definition level, values) triplets. At any given point in time, a ColumnReader points to a single (r, d, v) triplet. In order to move to the next triplet, call consume().

Depending on the type and the encoding of the column only a subset of the get* methods are implemented. Dictionary specific methods enable the upper layers to read the dictionary IDs without decoding the data. In particular the Converter will decode the strings in the dictionary only once and iterate on the dictionary IDs instead of the values.

Each iteration looks at the current definition level and value as well as the next repetition level:

  • The current definition level defines if the value is null.
  • If the value is defined we can read it with the correct get*() method.
  • Looking ahead to the next repetition determines what is the next column to read for in the FSA.
  • Method Details

    • getTotalValueCount

      @Deprecated long getTotalValueCount()
      Deprecated.
      will be removed in 2.0.0; Total values might not be able to be counted before reading the values (e.g. in case of column index based filtering)
      Returns:
      the totalCount of values to be consumed
    • consume

      void consume()
      Consume the current triplet, moving to the next value.
    • getCurrentRepetitionLevel

      int getCurrentRepetitionLevel()
      must return 0 when isFullyConsumed() == true
      Returns:
      the repetition level for the current value
    • getCurrentDefinitionLevel

      int getCurrentDefinitionLevel()
      Returns:
      the definition level for the current value
    • writeCurrentValueToConverter

      void writeCurrentValueToConverter()
      writes the current value to the converter
    • skip

      void skip()
      Skip the current value
    • getCurrentValueDictionaryID

      int getCurrentValueDictionaryID()
      available when the underlying encoding is dictionary based
      Returns:
      the dictionary id for the current value
    • getInteger

      int getInteger()
      Returns:
      the current value
    • getBoolean

      boolean getBoolean()
      Returns:
      the current value
    • getLong

      long getLong()
      Returns:
      the current value
    • getBinary

      Binary getBinary()
      Returns:
      the current value
    • getFloat

      float getFloat()
      Returns:
      the current value
    • getDouble

      double getDouble()
      Returns:
      the current value
    • getDescriptor

      ColumnDescriptor getDescriptor()
      Returns:
      Descriptor of the column.