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 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: ParquetDataColumnReader
      Initialize the reader by page data.
      Specified by:
      initFromPage in interface ParquetDataColumnReader
      Parameters:
      i - value count
      in - page data
      Throws:
      IOException
    • readBoolean

      public boolean readBoolean()
      Specified by:
      readBoolean in interface ParquetDataColumnReader
      Returns:
      the next Boolean from the page
    • readBoolean

      public boolean readBoolean(int id)
      Specified by:
      readBoolean in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Boolean from the dictionary by id
    • readBytes

      public byte[] readBytes()
      Specified by:
      readBytes in interface ParquetDataColumnReader
      Returns:
      the next Bytes from the page
    • readBytes

      public byte[] readBytes(int id)
      Specified by:
      readBytes in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Bytes from the dictionary by id
    • readFloat

      public float readFloat()
      Specified by:
      readFloat in interface ParquetDataColumnReader
      Returns:
      the next Float from the page
    • readFloat

      public float readFloat(int id)
      Specified by:
      readFloat in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Float from the dictionary by id
    • readDouble

      public double readDouble()
      Specified by:
      readDouble in interface ParquetDataColumnReader
      Returns:
      the next Double from the page
    • readDouble

      public double readDouble(int id)
      Specified by:
      readDouble in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Double from the dictionary by id
    • readTimestamp

      public org.apache.flink.table.data.TimestampData readTimestamp()
      Specified by:
      readTimestamp in interface ParquetDataColumnReader
      Returns:
      the next TimestampData from the page
    • readTimestamp

      public org.apache.flink.table.data.TimestampData readTimestamp(int id)
      Specified by:
      readTimestamp in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the TimestampData from the dictionary by id
    • readInteger

      public int readInteger()
      Specified by:
      readInteger in interface ParquetDataColumnReader
      Returns:
      the next Integer from the page
    • readInteger

      public int readInteger(int id)
      Specified by:
      readInteger in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Integer from the dictionary by id
    • readLong

      public long readLong(int id)
      Specified by:
      readLong in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Long from the dictionary by id
    • readLong

      public long readLong()
      Specified by:
      readLong in interface ParquetDataColumnReader
      Returns:
      the next Long from the page
    • readSmallInt

      public int readSmallInt()
      Specified by:
      readSmallInt in interface ParquetDataColumnReader
      Returns:
      the next SmallInt from the page
    • readSmallInt

      public int readSmallInt(int id)
      Specified by:
      readSmallInt in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the Small Int from the dictionary by id
    • readTinyInt

      public int readTinyInt()
      Specified by:
      readTinyInt in interface ParquetDataColumnReader
      Returns:
      the next TinyInt from the page
    • readTinyInt

      public int readTinyInt(int id)
      Specified by:
      readTinyInt in interface ParquetDataColumnReader
      Parameters:
      id - in dictionary
      Returns:
      the tiny int from the dictionary by id
    • readValueDictionaryId

      public int readValueDictionaryId()
      Specified by:
      readValueDictionaryId in interface ParquetDataColumnReader
      Returns:
      the next Dictionary ID from the page
    • skip

      public void skip()
    • getDictionary

      public org.apache.parquet.column.Dictionary getDictionary()
      Specified by:
      getDictionary in interface ParquetDataColumnReader
      Returns:
      the underlying dictionary if current reader is dictionary encoded