Class DictionaryValuesReader
- java.lang.Object
-
- org.apache.parquet.column.values.ValuesReader
-
- org.apache.parquet.column.values.dictionary.DictionaryValuesReader
-
public class DictionaryValuesReader extends ValuesReader
Reads values that have been dictionary encoded
-
-
Constructor Summary
Constructors Constructor Description DictionaryValuesReader(Dictionary dictionary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitFromPage(int valueCount, org.apache.parquet.bytes.ByteBufferInputStream stream)Called to initialize the column reader from a part of a page.BinaryreadBytes()doublereadDouble()floatreadFloat()intreadInteger()longreadLong()intreadValueDictionaryId()usable when the encoding is dictionary basedvoidskip()Skips the next value in the page-
Methods inherited from class org.apache.parquet.column.values.ValuesReader
getNextOffset, initFromPage, initFromPage, readBoolean, skip, updateNextOffset
-
-
-
-
Constructor Detail
-
DictionaryValuesReader
public DictionaryValuesReader(Dictionary dictionary)
-
-
Method Detail
-
initFromPage
public void initFromPage(int valueCount, org.apache.parquet.bytes.ByteBufferInputStream stream) throws IOExceptionDescription 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
-
readValueDictionaryId
public int readValueDictionaryId()
Description copied from class:ValuesReaderusable when the encoding is dictionary based- Overrides:
readValueDictionaryIdin classValuesReader- Returns:
- the id of the next value from the page
-
readBytes
public Binary readBytes()
- Overrides:
readBytesin classValuesReader- Returns:
- the next Binary from the page
-
readFloat
public float readFloat()
- Overrides:
readFloatin classValuesReader- Returns:
- the next float from the page
-
readDouble
public double readDouble()
- Overrides:
readDoublein classValuesReader- Returns:
- the next double from the page
-
readInteger
public int readInteger()
- Overrides:
readIntegerin classValuesReader- Returns:
- the next integer from the page
-
readLong
public long readLong()
- Overrides:
readLongin classValuesReader- Returns:
- the next long from the page
-
skip
public void skip()
Description copied from class:ValuesReaderSkips the next value in the page- Specified by:
skipin classValuesReader
-
-