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,
ParquetReaderStats parquetReaderStats,
long numRecordsToRead,
boolean useAsyncColReader) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<ColumnReader<?>> |
getColumnReaders() |
ColumnReader<?> |
getFirstColumnReader()
Several readers use the first column reader to get information about the whole
record or group (such as row count.)
|
long |
getRecordsToRead() |
ParquetReaderStats |
parquetReaderStats() |
long |
recordsRead() |
void |
resetBatch() |
ParquetSchema |
schema() |
void |
updateCounts(int readCount) |
boolean |
useAsyncColReader() |
VarLenBinaryReader |
varLengthReader() |
public ReadState(ParquetSchema schema, ParquetReaderStats parquetReaderStats, long numRecordsToRead, boolean useAsyncColReader)
public void buildReader(ParquetRecordReader reader, OutputMutator output) throws Exception
reader - output - Exceptionpublic ColumnReader<?> getFirstColumnReader()
public void resetBatch()
public ParquetSchema schema()
public List<ColumnReader<?>> getColumnReaders()
public long recordsRead()
public VarLenBinaryReader varLengthReader()
public long getRecordsToRead()
public boolean useAsyncColReader()
public ParquetReaderStats parquetReaderStats()
public 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 © 2017 The Apache Software Foundation. All rights reserved.