Class FixedLenByteArrayPlainValuesReader

java.lang.Object
org.apache.parquet.column.values.ValuesReader
org.apache.parquet.column.values.plain.FixedLenByteArrayPlainValuesReader

public class FixedLenByteArrayPlainValuesReader extends ValuesReader
ValuesReader for FIXED_LEN_BYTE_ARRAY.

Reads directly from a ByteBuffer, bypassing the ByteBufferInputStream wrapper to avoid per-value stream overhead (remaining checks, IOException wrapping, virtual dispatch). The underlying page data is obtained as a single contiguous ByteBuffer via ByteBufferInputStream.slice(int).

  • Constructor Details

    • FixedLenByteArrayPlainValuesReader

      public FixedLenByteArrayPlainValuesReader(int length)
  • Method Details

    • readBytes

      public Binary readBytes()
      Overrides:
      readBytes in class ValuesReader
      Returns:
      the next Binary from the page
    • skip

      public void skip()
      Description copied from class: ValuesReader
      Skips the next value in the page
      Specified by:
      skip in class ValuesReader
    • skip

      public void skip(int n)
      Description copied from class: ValuesReader
      Skips the next n values in the page
      Overrides:
      skip in class ValuesReader
      Parameters:
      n - the number of values to be skipped
    • initFromPage

      public void initFromPage(int valueCount, org.apache.parquet.bytes.ByteBufferInputStream stream) throws IOException
      Description copied from class: ValuesReader
      Called to initialize the column reader from a part of a page.

      Implementations must consume all bytes from the input stream, leaving the stream ready to read the next section of data. The underlying implementation knows how much data to read, so a length is not provided.

      Each page may contain several sections:

      • repetition levels column
      • definition levels column
      • data column
      Overrides:
      initFromPage in class ValuesReader
      Parameters:
      valueCount - count of values in this page
      stream - an input stream containing the page data at the correct offset
      Throws:
      IOException - if there is an exception while reading from the input stream