Class AbstractColumnReader<VECTOR extends org.apache.flink.table.data.columnar.vector.writable.WritableColumnVector>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.parquet.column.ColumnDescriptor descriptor  
      protected org.apache.parquet.column.Dictionary dictionary
      The dictionary, if this column has dictionary encoding.
      protected int maxDefLevel
      Maximum definition level for this column.
      protected org.apache.flink.formats.parquet.vector.reader.RunLengthDecoder runLenDecoder
      Run length decoder for data and dictionary.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractColumnReader​(org.apache.parquet.column.ColumnDescriptor descriptor, org.apache.parquet.column.page.PageReader pageReader)  
    • Field Detail

      • dictionary

        protected final org.apache.parquet.column.Dictionary dictionary
        The dictionary, if this column has dictionary encoding.
      • maxDefLevel

        protected final int maxDefLevel
        Maximum definition level for this column.
      • descriptor

        protected final org.apache.parquet.column.ColumnDescriptor descriptor
      • runLenDecoder

        protected org.apache.flink.formats.parquet.vector.reader.RunLengthDecoder runLenDecoder
        Run length decoder for data and dictionary.
    • Constructor Detail

      • AbstractColumnReader

        public AbstractColumnReader​(org.apache.parquet.column.ColumnDescriptor descriptor,
                                    org.apache.parquet.column.page.PageReader pageReader)
                             throws IOException
        Throws:
        IOException
    • Method Detail

      • checkTypeName

        protected void checkTypeName​(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName expectedName)
      • readToVector

        public final void readToVector​(int readNumber,
                                       VECTOR vector)
                                throws IOException
        Reads `total` values from this columnReader into column.
        Specified by:
        readToVector in interface ColumnReader<VECTOR extends org.apache.flink.table.data.columnar.vector.writable.WritableColumnVector>
        Parameters:
        readNumber - number to read.
        vector - vector to write.
        Throws:
        IOException
      • afterReadPage

        protected void afterReadPage()
        After read a page, we may need some initialization.
      • supportLazyDecode

        protected boolean supportLazyDecode()
        Support lazy dictionary ids decode. See more in ParquetDictionary. If return false, we will decode all the data first.
      • readBatch

        protected abstract void readBatch​(int rowId,
                                          int num,
                                          VECTOR column)
        Read batch from runLenDecoder and dataInputStream.
      • readBatchFromDictionaryIds

        protected abstract void readBatchFromDictionaryIds​(int rowId,
                                                           int num,
                                                           VECTOR column,
                                                           org.apache.flink.table.data.columnar.vector.writable.WritableIntVector dictionaryIds)
        Decode dictionary ids to data. From runLenDecoder and dictionaryIdsDecoder.