Class ParquetDataColumnReaderFactory.DefaultParquetDataColumnReader
java.lang.Object
org.apache.flink.formats.parquet.vector.reader.ParquetDataColumnReaderFactory.DefaultParquetDataColumnReader
- All Implemented Interfaces:
ParquetDataColumnReader
- Direct Known Subclasses:
ParquetDataColumnReaderFactory.TypesFromInt96PageReader
- Enclosing class:
- ParquetDataColumnReaderFactory
public static class ParquetDataColumnReaderFactory.DefaultParquetDataColumnReader
extends Object
implements ParquetDataColumnReader
The default data column reader for existing Parquet page reader which works for both
dictionary or non dictionary types, Mirror from dictionary encoding path.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.parquet.column.Dictionaryprotected final org.apache.parquet.column.values.ValuesReader -
Constructor Summary
ConstructorsConstructorDescriptionDefaultParquetDataColumnReader(org.apache.parquet.column.Dictionary dict) DefaultParquetDataColumnReader(org.apache.parquet.column.values.ValuesReader valuesReader) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.parquet.column.DictionaryvoidinitFromPage(int i, org.apache.parquet.bytes.ByteBufferInputStream in) Initialize the reader by page data.booleanbooleanreadBoolean(int id) byte[]byte[]readBytes(int id) doubledoublereadDouble(int id) floatfloatreadFloat(int id) intintreadInteger(int id) longreadLong()longreadLong(int id) intintreadSmallInt(int id) org.apache.flink.table.data.TimestampDataorg.apache.flink.table.data.TimestampDatareadTimestamp(int id) intintreadTinyInt(int id) intvoidskip()
-
Field Details
-
valuesReader
protected final org.apache.parquet.column.values.ValuesReader valuesReader -
dict
protected final org.apache.parquet.column.Dictionary dict
-
-
Constructor Details
-
DefaultParquetDataColumnReader
public DefaultParquetDataColumnReader(org.apache.parquet.column.values.ValuesReader valuesReader) -
DefaultParquetDataColumnReader
public DefaultParquetDataColumnReader(org.apache.parquet.column.Dictionary dict)
-
-
Method Details
-
initFromPage
public void initFromPage(int i, org.apache.parquet.bytes.ByteBufferInputStream in) throws IOException Description copied from interface:ParquetDataColumnReaderInitialize the reader by page data.- Specified by:
initFromPagein interfaceParquetDataColumnReader- Parameters:
i- value countin- page data- Throws:
IOException
-
readBoolean
public boolean readBoolean()- Specified by:
readBooleanin interfaceParquetDataColumnReader- Returns:
- the next Boolean from the page
-
readBoolean
public boolean readBoolean(int id) - Specified by:
readBooleanin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Boolean from the dictionary by id
-
readBytes
public byte[] readBytes()- Specified by:
readBytesin interfaceParquetDataColumnReader- Returns:
- the next Bytes from the page
-
readBytes
public byte[] readBytes(int id) - Specified by:
readBytesin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Bytes from the dictionary by id
-
readFloat
public float readFloat()- Specified by:
readFloatin interfaceParquetDataColumnReader- Returns:
- the next Float from the page
-
readFloat
public float readFloat(int id) - Specified by:
readFloatin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Float from the dictionary by id
-
readDouble
public double readDouble()- Specified by:
readDoublein interfaceParquetDataColumnReader- Returns:
- the next Double from the page
-
readDouble
public double readDouble(int id) - Specified by:
readDoublein interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Double from the dictionary by id
-
readTimestamp
public org.apache.flink.table.data.TimestampData readTimestamp()- Specified by:
readTimestampin interfaceParquetDataColumnReader- Returns:
- the next TimestampData from the page
-
readTimestamp
public org.apache.flink.table.data.TimestampData readTimestamp(int id) - Specified by:
readTimestampin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the TimestampData from the dictionary by id
-
readInteger
public int readInteger()- Specified by:
readIntegerin interfaceParquetDataColumnReader- Returns:
- the next Integer from the page
-
readInteger
public int readInteger(int id) - Specified by:
readIntegerin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Integer from the dictionary by id
-
readLong
public long readLong(int id) - Specified by:
readLongin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Long from the dictionary by id
-
readLong
public long readLong()- Specified by:
readLongin interfaceParquetDataColumnReader- Returns:
- the next Long from the page
-
readSmallInt
public int readSmallInt()- Specified by:
readSmallIntin interfaceParquetDataColumnReader- Returns:
- the next SmallInt from the page
-
readSmallInt
public int readSmallInt(int id) - Specified by:
readSmallIntin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the Small Int from the dictionary by id
-
readTinyInt
public int readTinyInt()- Specified by:
readTinyIntin interfaceParquetDataColumnReader- Returns:
- the next TinyInt from the page
-
readTinyInt
public int readTinyInt(int id) - Specified by:
readTinyIntin interfaceParquetDataColumnReader- Parameters:
id- in dictionary- Returns:
- the tiny int from the dictionary by id
-
readValueDictionaryId
public int readValueDictionaryId()- Specified by:
readValueDictionaryIdin interfaceParquetDataColumnReader- Returns:
- the next Dictionary ID from the page
-
skip
public void skip() -
getDictionary
public org.apache.parquet.column.Dictionary getDictionary()- Specified by:
getDictionaryin interfaceParquetDataColumnReader- Returns:
- the underlying dictionary if current reader is dictionary encoded
-