Package org.apache.parquet.column.impl
Class ColumnReaderImpl
- java.lang.Object
-
- org.apache.parquet.column.impl.ColumnReaderImpl
-
- All Implemented Interfaces:
ColumnReader
public class ColumnReaderImpl extends Object
ColumnReader implementation for the scenario when column indexes are not used (all values are read)
-
-
Field Summary
Fields Modifier and Type Field Description protected ValuesReaderdataColumn
-
Constructor Summary
Constructors Constructor Description ColumnReaderImpl(ColumnDescriptor path, PageReader pageReader, PrimitiveConverter converter, org.apache.parquet.VersionParser.ParsedVersion writerVersion)creates a reader for triplets
-
Method Summary
All Methods Instance Methods Concrete 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.voidreadValue()Reads the value into the binding.voidskip()Skip the current valuevoidwriteCurrentValueToConverter()writes the current value to the converter
-
-
-
Field Detail
-
dataColumn
protected ValuesReader dataColumn
-
-
Constructor Detail
-
ColumnReaderImpl
public ColumnReaderImpl(ColumnDescriptor path, PageReader pageReader, PrimitiveConverter converter, org.apache.parquet.VersionParser.ParsedVersion writerVersion)
creates a reader for triplets- Parameters:
path- the descriptor for the corresponding columnpageReader- the underlying store to read fromconverter- a converter that materializes the values in this column in the current recordwriterVersion- writer version string from the Parquet file being read
-
-
Method Detail
-
writeCurrentValueToConverter
public void writeCurrentValueToConverter()
writes the current value to the converter- Specified by:
writeCurrentValueToConverterin interfaceColumnReader- See Also:
ColumnReader.writeCurrentValueToConverter()
-
getCurrentValueDictionaryID
public int getCurrentValueDictionaryID()
Description copied from interface:ColumnReaderavailable when the underlying encoding is dictionary based- Specified by:
getCurrentValueDictionaryIDin interfaceColumnReader- Returns:
- the dictionary id for the current value
-
getInteger
public int getInteger()
- Specified by:
getIntegerin interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getInteger()
-
getBoolean
public boolean getBoolean()
- Specified by:
getBooleanin interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getBoolean()
-
getLong
public long getLong()
- Specified by:
getLongin interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getLong()
-
getBinary
public Binary getBinary()
- Specified by:
getBinaryin interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getBinary()
-
getFloat
public float getFloat()
- Specified by:
getFloatin interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getFloat()
-
getDouble
public double getDouble()
- Specified by:
getDoublein interfaceColumnReader- Returns:
- the current value
- See Also:
ColumnReader.getDouble()
-
getCurrentRepetitionLevel
public int getCurrentRepetitionLevel()
must return 0 when isFullyConsumed() == true- Specified by:
getCurrentRepetitionLevelin interfaceColumnReader- Returns:
- the repetition level for the current value
- See Also:
ColumnReader.getCurrentRepetitionLevel()
-
getDescriptor
public ColumnDescriptor getDescriptor()
- Specified by:
getDescriptorin interfaceColumnReader- Returns:
- Descriptor of the column.
- See Also:
ColumnReader.getDescriptor()
-
readValue
public void readValue()
Reads the value into the binding.
-
skip
public void skip()
Skip the current value- Specified by:
skipin interfaceColumnReader- See Also:
ColumnReader.skip()
-
getCurrentDefinitionLevel
public int getCurrentDefinitionLevel()
- Specified by:
getCurrentDefinitionLevelin interfaceColumnReader- Returns:
- the definition level for the current value
- See Also:
ColumnReader.getCurrentDefinitionLevel()
-
consume
public void consume()
Consume the current triplet, moving to the next value.- Specified by:
consumein interfaceColumnReader- See Also:
ColumnReader.consume()
-
getTotalValueCount
@Deprecated public long getTotalValueCount()
Deprecated.- Specified by:
getTotalValueCountin interfaceColumnReader- Returns:
- the totalCount of values to be consumed
- See Also:
ColumnReader.getTotalValueCount()
-
-