public class ReadState extends Object
At present, this is a bit of a muddle as it holds all read state. As such, this is a snapshot of a refactoring effort. Subsequent passes will move state into specific readers where possible.
Constructor and Description |
---|
ReadState(ParquetSchema schema,
RecordBatchSizerManager batchSizerMgr,
ParquetReaderStats parquetReaderStats,
long numRecordsToRead,
boolean useAsyncColReader) |
Modifier and Type | Method and Description |
---|---|
RecordBatchSizerManager |
batchSizerMgr() |
void |
buildReader(ParquetRecordReader reader,
OutputMutator output)
Create the readers needed to read columns: fixed-length or variable length.
|
void |
close() |
void |
fillNullVectors(int readCount)
When the SELECT clause references columns that do not exist in the Parquet
file, we don't issue an error; instead we simply make up a column and
fill it with nulls.
|
ColumnReader<?> |
getFirstColumnReader()
Several readers use the first column reader to get information about the whole
record or group (such as row count.)
|
List<ColumnReader<?>> |
getFixedLenColumnReaders() |
int |
getRemainingValuesToRead() |
long |
getTotalRecordsToRead() |
int |
getValuesReadInCurrentPass() |
ParquetReaderStats |
parquetReaderStats() |
long |
recordsRead() |
void |
resetBatch() |
ParquetSchema |
schema() |
void |
setValuesReadInCurrentPass(int valuesReadInCurrentBatch) |
void |
updateCounts(int readCount) |
boolean |
useAsyncColReader() |
VarLenBinaryReader |
varLengthReader() |
public ReadState(ParquetSchema schema, RecordBatchSizerManager batchSizerMgr, ParquetReaderStats parquetReaderStats, long numRecordsToRead, boolean useAsyncColReader)
public void buildReader(ParquetRecordReader reader, OutputMutator output) throws Exception
reader
- parquet record readeroutput
- output mutatorException
public ColumnReader<?> getFirstColumnReader()
public void resetBatch()
public ParquetSchema schema()
public RecordBatchSizerManager batchSizerMgr()
public List<ColumnReader<?>> getFixedLenColumnReaders()
public long recordsRead()
public VarLenBinaryReader varLengthReader()
public long getTotalRecordsToRead()
public boolean useAsyncColReader()
public ParquetReaderStats parquetReaderStats()
public int getValuesReadInCurrentPass()
public int getRemainingValuesToRead()
public void setValuesReadInCurrentPass(int valuesReadInCurrentBatch)
valuesReadInCurrentBatch
- the valuesReadInCurrentBatch to setpublic void fillNullVectors(int readCount)
readCount
- the number of rows read in the present record batch,
which is the number of null column values to createpublic void updateCounts(int readCount)
public void close()
Copyright © 1970 The Apache Software Foundation. All rights reserved.