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
Fields Modifier and Type Field Description protected org.apache.parquet.column.Dictionarydictprotected org.apache.parquet.column.values.ValuesReadervaluesReader
-
Constructor Summary
Constructors Constructor Description DefaultParquetDataColumnReader(org.apache.parquet.column.Dictionary dict)DefaultParquetDataColumnReader(org.apache.parquet.column.values.ValuesReader valuesReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.parquet.column.DictionarygetDictionary()voidinitFromPage(int i, org.apache.parquet.bytes.ByteBufferInputStream in)Initialize the reader by page data.booleanreadBoolean()booleanreadBoolean(int id)byte[]readBytes()byte[]readBytes(int id)doublereadDouble()doublereadDouble(int id)floatreadFloat()floatreadFloat(int id)intreadInteger()intreadInteger(int id)longreadLong()longreadLong(int id)intreadSmallInt()intreadSmallInt(int id)org.apache.flink.table.data.TimestampDatareadTimestamp()org.apache.flink.table.data.TimestampDatareadTimestamp(int id)intreadTinyInt()intreadTinyInt(int id)intreadValueDictionaryId()voidskip()
-
-
-
Method Detail
-
initFromPage
public void initFromPage(int i, org.apache.parquet.bytes.ByteBufferInputStream in) throws IOExceptionDescription 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
-
-