Package org.apache.parquet.column
Interface ColumnReader
-
- All Known Implementing Classes:
ColumnReaderImpl
public interface ColumnReaderReader 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, callconsume().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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidconsume()Consume the current triplet, moving to the next value.BinarygetBinary()booleangetBoolean()intgetCurrentDefinitionLevel()intgetCurrentRepetitionLevel()must return 0 when isFullyConsumed() == trueintgetCurrentValueDictionaryID()available when the underlying encoding is dictionary basedColumnDescriptorgetDescriptor()doublegetDouble()floatgetFloat()intgetInteger()longgetLong()longgetTotalValueCount()Deprecated.will be removed in 2.0.0; Total values might not be able to be counted before reading the values (e.g.voidskip()Skip the current valuevoidwriteCurrentValueToConverter()writes the current value to the converter
-
-
-
Method Detail
-
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.
-
-