Class PlainValuesReader
java.lang.Object
org.apache.parquet.column.values.ValuesReader
org.apache.parquet.column.values.plain.PlainValuesReader
- Direct Known Subclasses:
PlainValuesReader.DoublePlainValuesReader,PlainValuesReader.FloatPlainValuesReader,PlainValuesReader.IntegerPlainValuesReader,PlainValuesReader.LongPlainValuesReader
Plain encoding for float, double, int, long.
Reads directly from a ByteBuffer with ByteOrder.LITTLE_ENDIAN byte order,
bypassing the deprecated LittleEndianDataInputStream wrapper to avoid per-value virtual
dispatch overhead. The underlying page data is obtained as a single contiguous ByteBuffer
via ByteBufferInputStream.slice(int).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitFromPage(int valueCount, org.apache.parquet.bytes.ByteBufferInputStream stream) Called to initialize the column reader from a part of a page.voidskip()Skips the next value in the pageMethods inherited from class org.apache.parquet.column.values.ValuesReader
getNextOffset, initFromPage, initFromPage, readBoolean, readBytes, readDouble, readFloat, readInteger, readLong, readValueDictionaryId, skip, updateNextOffset
-
Field Details
-
buffer
-
-
Constructor Details
-
PlainValuesReader
public PlainValuesReader()
-
-
Method Details
-
initFromPage
public void initFromPage(int valueCount, org.apache.parquet.bytes.ByteBufferInputStream stream) throws IOException Description copied from class:ValuesReaderCalled 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:
initFromPagein classValuesReader- Parameters:
valueCount- count of values in this pagestream- an input stream containing the page data at the correct offset- Throws:
IOException- if there is an exception while reading from the input stream
-
skip
public void skip()Description copied from class:ValuesReaderSkips the next value in the page- Specified by:
skipin classValuesReader
-