Class ParquetFileReader.RowRecordCollector
Object
org.apache.parquet.io.api.RecordMaterializer<Object>
io.delta.kernel.defaults.internal.parquet.ParquetFileReader.RowRecordCollector
- Enclosing class:
ParquetFileReader
public static class ParquetFileReader.RowRecordCollector
extends org.apache.parquet.io.api.RecordMaterializer<Object>
Collects the records given by the Parquet reader as columnar data. Parquet reader allows
reading data row by row, but
ParquetFileReader wants to expose the data as a columnar
batch. Parquet reader takes an implementation of RecordMaterializer to which it gives
data for each column one row at a time. This RecordMaterializer implementation collects
the column values for multiple rows and returns a ColumnarBatch at the end.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.io.api.RecordMaterializer
org.apache.parquet.io.api.RecordMaterializer.RecordMaterializationException -
Constructor Summary
ConstructorsConstructorDescriptionRowRecordCollector(int maxBatchSize, io.delta.kernel.types.StructType readSchema, org.apache.parquet.schema.MessageType fileSchema) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalizeCurrentRow(long fileRowIndex) Finalize the current row.Return a fake object.io.delta.kernel.data.ColumnarBatchgetDataAsColumnarBatch(int batchSize) Return the data collected so far as aColumnarBatch.org.apache.parquet.io.api.GroupConvertervoid
-
Constructor Details
-
RowRecordCollector
public RowRecordCollector(int maxBatchSize, io.delta.kernel.types.StructType readSchema, org.apache.parquet.schema.MessageType fileSchema)
-
-
Method Details
-
skipCurrentRecord
public void skipCurrentRecord()- Overrides:
skipCurrentRecordin classorg.apache.parquet.io.api.RecordMaterializer<Object>
-
getCurrentRecord
Return a fake object. This is not used byParquetFileReader, insteadgetDataAsColumnarBatch(int)} once a sufficient number of rows are collected.- Specified by:
getCurrentRecordin classorg.apache.parquet.io.api.RecordMaterializer<Object>
-
getRootConverter
public org.apache.parquet.io.api.GroupConverter getRootConverter()- Specified by:
getRootConverterin classorg.apache.parquet.io.api.RecordMaterializer<Object>
-
getDataAsColumnarBatch
public io.delta.kernel.data.ColumnarBatch getDataAsColumnarBatch(int batchSize) Return the data collected so far as aColumnarBatch. -
finalizeCurrentRow
public void finalizeCurrentRow(long fileRowIndex) Finalize the current row.- Parameters:
fileRowIndex- the file row index of the row just processed
-