Interface ColumnPageReader

All Superinterfaces:
AutoCloseable

public interface ColumnPageReader extends AutoCloseable
Provides the API for reading a single parquet page
  • Method Details

    • numRows

      default long numRows(SeekableChannelContext channelContext) throws IOException
      Parameters:
      channelContext - The channel context to use for reading the parquet file
      Returns:
      The number of rows in this page, or -1 if it's unknown.
      Throws:
      IOException
    • materialize

      Object materialize(Object nullValue, SeekableChannelContext channelContext) throws IOException
      Triggers the value decompression and decoding
      Parameters:
      nullValue - The value to be stored under the null entries
      channelContext - The channel context to use for reading the parquet file
      Returns:
      the data for that page in a format that makes sense for the given type - typically array of something that makes sense
      Throws:
      IOException
    • readKeyValues

      IntBuffer readKeyValues(IntBuffer keyDest, int nullPlaceholder, SeekableChannelContext channelContext) throws IOException
      Directly read the key integral values when there's a dictionary.
      Parameters:
      keyDest - A properly sized buffer (at least numValues()) to hold the keys
      nullPlaceholder - The value to use for nulls.
      channelContext - The channel context to use for reading the parquet file
      Returns:
      A buffer holding the end of each repeated row. If the column is not repeating, null.
      Throws:
      IOException
    • numValues

      int numValues()
      Returns:
      The number of values in this page
    • getDictionary

      @NotNull @NotNull org.apache.parquet.column.Dictionary getDictionary(SeekableChannelContext channelContext)
      Parameters:
      channelContext - The channel context to use for reading the parquet file
      Returns:
      Parquet dictionary for this column chunk
      ApiNote:
      The result will never be null. It will instead be ColumnChunkReader.NULL_DICTIONARY.