public abstract class AbstractColumnReader<VECTOR extends org.apache.paimon.data.columnar.writable.WritableColumnVector> extends Object implements ColumnReader<VECTOR>
ColumnReader. See ColumnReaderImpl, part of the code is referred from
Apache Spark and Apache Parquet.| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.parquet.column.ColumnDescriptor |
descriptor |
protected org.apache.parquet.column.Dictionary |
dictionary
The dictionary, if this column has dictionary encoding.
|
protected int |
maxDefLevel
Maximum definition level for this column.
|
protected org.apache.paimon.format.parquet.reader.RunLengthDecoder |
runLenDecoder
Run length decoder for data and dictionary.
|
| 构造器和说明 |
|---|
AbstractColumnReader(org.apache.parquet.column.ColumnDescriptor descriptor,
org.apache.parquet.column.page.PageReader pageReader) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterReadPage()
After read a page, we may need some initialization.
|
protected void |
checkTypeName(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName expectedName) |
protected abstract void |
readBatch(int rowId,
int num,
VECTOR column)
Read batch from
runLenDecoder and dataInputStream. |
protected abstract void |
readBatchFromDictionaryIds(int rowId,
int num,
VECTOR column,
org.apache.paimon.data.columnar.writable.WritableIntVector dictionaryIds)
Decode dictionary ids to data.
|
void |
readToVector(int readNumber,
VECTOR vector)
Reads `total` values from this columnReader into column.
|
protected boolean |
supportLazyDecode()
Support lazy dictionary ids decode.
|
protected final org.apache.parquet.column.Dictionary dictionary
protected final int maxDefLevel
protected final org.apache.parquet.column.ColumnDescriptor descriptor
protected org.apache.paimon.format.parquet.reader.RunLengthDecoder runLenDecoder
public AbstractColumnReader(org.apache.parquet.column.ColumnDescriptor descriptor,
org.apache.parquet.column.page.PageReader pageReader)
throws IOException
IOExceptionprotected void checkTypeName(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName expectedName)
public final void readToVector(int readNumber,
VECTOR vector)
throws IOException
readToVector 在接口中 ColumnReader<VECTOR extends org.apache.paimon.data.columnar.writable.WritableColumnVector>readNumber - number to read.vector - vector to write.IOExceptionprotected void afterReadPage()
protected boolean supportLazyDecode()
ParquetDictionary. If return false,
we will decode all the data first.protected abstract void readBatch(int rowId,
int num,
VECTOR column)
runLenDecoder and dataInputStream.protected abstract void readBatchFromDictionaryIds(int rowId,
int num,
VECTOR column,
org.apache.paimon.data.columnar.writable.WritableIntVector dictionaryIds)
runLenDecoder and dictionaryIdsDecoder.Copyright © 2023 The Apache Software Foundation. All rights reserved.