Class VectorizedArrowReader.ConstantVectorReader<T>

java.lang.Object
org.apache.iceberg.arrow.vectorized.VectorizedArrowReader
org.apache.iceberg.arrow.vectorized.VectorizedArrowReader.ConstantVectorReader<T>
Type Parameters:
T - The constant value to use
All Implemented Interfaces:
VectorizedReader<VectorHolder>
Enclosing class:
VectorizedArrowReader

public static class VectorizedArrowReader.ConstantVectorReader<T> extends VectorizedArrowReader
A Dummy Vector Reader which doesn't actually read files, instead it returns a dummy VectorHolder which indicates the constant value which should be used for this column.
  • Constructor Details

    • ConstantVectorReader

      public ConstantVectorReader(Types.NestedField icebergField, T value)
  • Method Details

    • read

      public VectorHolder read(VectorHolder reuse, int numValsToRead)
      Description copied from interface: VectorizedReader
      Reads a batch of type @param <T> and of size numRows
      Specified by:
      read in interface VectorizedReader<T>
      Overrides:
      read in class VectorizedArrowReader
      Parameters:
      reuse - container for the last batch to be reused for next batch
      numValsToRead - number of rows to read
      Returns:
      batch of records of type @param <T>
    • setRowGroupInfo

      public void setRowGroupInfo(org.apache.parquet.column.page.PageReadStore source, Map<org.apache.parquet.hadoop.metadata.ColumnPath,org.apache.parquet.hadoop.metadata.ColumnChunkMetaData> metadata, long rowPosition)
      Description copied from interface: VectorizedReader
      Sets the row group information to be used with this reader
      Specified by:
      setRowGroupInfo in interface VectorizedReader<T>
      Overrides:
      setRowGroupInfo in class VectorizedArrowReader
      Parameters:
      source - row group information for all the columns
      metadata - map of ColumnPath -> ColumnChunkMetaData for the row group
      rowPosition - the row group's row offset in the parquet file
    • toString

      public String toString()
      Overrides:
      toString in class VectorizedArrowReader
    • setBatchSize

      public void setBatchSize(int batchSize)
      Specified by:
      setBatchSize in interface VectorizedReader<T>
      Overrides:
      setBatchSize in class VectorizedArrowReader