public static class ParquetDataColumnReaderFactory.DefaultParquetDataColumnReader extends Object implements ParquetDataColumnReader
Modifier and Type | Field and Description |
---|---|
protected org.apache.parquet.column.Dictionary |
dict |
protected int |
length |
protected org.apache.parquet.column.values.ValuesReader |
valuesReader |
Constructor and Description |
---|
DefaultParquetDataColumnReader(org.apache.parquet.column.Dictionary dict,
int length) |
DefaultParquetDataColumnReader(org.apache.parquet.column.values.ValuesReader valuesReader,
int length) |
Modifier and Type | Method and Description |
---|---|
protected static byte[] |
convertToBytes(String value)
Method to convert string to UTF-8 bytes.
|
protected String |
enforceMaxLength(String value)
Enforce the max legnth of varchar or char.
|
org.apache.parquet.column.Dictionary |
getDictionary() |
protected String |
getPaddedString(String value)
Enforce the char length.
|
void |
initFromPage(int i,
org.apache.parquet.bytes.ByteBufferInputStream in)
Initialize the reader by page data.
|
boolean |
isValid(double value) |
boolean |
isValid(float value) |
boolean |
isValid(long value) |
boolean |
readBoolean() |
boolean |
readBoolean(int id) |
byte[] |
readBytes() |
byte[] |
readBytes(int id) |
byte[] |
readChar() |
byte[] |
readChar(int id) |
byte[] |
readDecimal() |
byte[] |
readDecimal(int id) |
double |
readDouble() |
double |
readDouble(int id) |
float |
readFloat() |
float |
readFloat(int id) |
long |
readInteger() |
long |
readInteger(int id) |
long |
readLong() |
long |
readLong(int id) |
byte[] |
readString() |
byte[] |
readString(int id) |
Timestamp |
readTimestamp() |
Timestamp |
readTimestamp(int id) |
int |
readValueDictionaryId() |
byte[] |
readVarchar() |
byte[] |
readVarchar(int id) |
void |
skip() |
protected org.apache.parquet.column.values.ValuesReader valuesReader
protected org.apache.parquet.column.Dictionary dict
protected int length
public DefaultParquetDataColumnReader(org.apache.parquet.column.values.ValuesReader valuesReader, int length)
public DefaultParquetDataColumnReader(org.apache.parquet.column.Dictionary dict, int length)
public void initFromPage(int i, org.apache.parquet.bytes.ByteBufferInputStream in) throws IOException
ParquetDataColumnReader
initFromPage
in interface ParquetDataColumnReader
i
- value countin
- page dataIOException
public boolean readBoolean()
readBoolean
in interface ParquetDataColumnReader
public boolean readBoolean(int id)
readBoolean
in interface ParquetDataColumnReader
id
- in dictionarypublic byte[] readString(int id)
readString
in interface ParquetDataColumnReader
id
- in dictionarypublic byte[] readString()
readString
in interface ParquetDataColumnReader
public byte[] readVarchar()
readVarchar
in interface ParquetDataColumnReader
public byte[] readVarchar(int id)
readVarchar
in interface ParquetDataColumnReader
id
- in dictionarypublic byte[] readChar()
readChar
in interface ParquetDataColumnReader
public byte[] readChar(int id)
readChar
in interface ParquetDataColumnReader
id
- in dictionarypublic byte[] readBytes()
readBytes
in interface ParquetDataColumnReader
public byte[] readBytes(int id)
readBytes
in interface ParquetDataColumnReader
id
- in dictionarypublic byte[] readDecimal()
readDecimal
in interface ParquetDataColumnReader
public byte[] readDecimal(int id)
readDecimal
in interface ParquetDataColumnReader
id
- in dictionarypublic float readFloat()
readFloat
in interface ParquetDataColumnReader
public float readFloat(int id)
readFloat
in interface ParquetDataColumnReader
id
- in dictionarypublic double readDouble()
readDouble
in interface ParquetDataColumnReader
public double readDouble(int id)
readDouble
in interface ParquetDataColumnReader
id
- in dictionarypublic Timestamp readTimestamp()
readTimestamp
in interface ParquetDataColumnReader
public Timestamp readTimestamp(int id)
readTimestamp
in interface ParquetDataColumnReader
id
- in dictionarypublic long readInteger()
readInteger
in interface ParquetDataColumnReader
public long readInteger(int id)
readInteger
in interface ParquetDataColumnReader
id
- in dictionarypublic boolean isValid(long value)
isValid
in interface ParquetDataColumnReader
value
- data to be checked for validitypublic boolean isValid(float value)
isValid
in interface ParquetDataColumnReader
public boolean isValid(double value)
isValid
in interface ParquetDataColumnReader
public long readLong(int id)
readLong
in interface ParquetDataColumnReader
id
- in dictionarypublic long readLong()
readLong
in interface ParquetDataColumnReader
public int readValueDictionaryId()
readValueDictionaryId
in interface ParquetDataColumnReader
public void skip()
public org.apache.parquet.column.Dictionary getDictionary()
getDictionary
in interface ParquetDataColumnReader
protected String enforceMaxLength(String value)
protected static byte[] convertToBytes(String value)
Copyright © 2022 The Apache Software Foundation. All rights reserved.