Package io.delta.kernel.defaults.engine
Class DefaultParquetHandler
Object
io.delta.kernel.defaults.engine.DefaultParquetHandler
- All Implemented Interfaces:
io.delta.kernel.engine.ParquetHandler
Default implementation of
ParquetHandler based on Hadoop APIs.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultParquetHandler(FileIO fileIO) Create an instance of defaultParquetHandlerimplementation. -
Method Summary
Modifier and TypeMethodDescriptionio.delta.kernel.utils.CloseableIterator<io.delta.kernel.engine.FileReadResult> readParquetFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> fileIter, io.delta.kernel.types.StructType physicalSchema, Optional<io.delta.kernel.expressions.Predicate> predicate) voidwriteParquetFileAtomically(String filePath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.FilteredColumnarBatch> data) Makes use ofLogStoreimplementations in `delta-storage` to atomically write the data to a file depending upon the destination filesystem.io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.DataFileStatus> writeParquetFiles(String directoryPath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.FilteredColumnarBatch> dataIter, List<io.delta.kernel.expressions.Column> statsColumns)
-
Constructor Details
-
DefaultParquetHandler
Create an instance of defaultParquetHandlerimplementation.- Parameters:
fileIO- File IO implementation to use for reading and writing files.
-
-
Method Details
-
readParquetFiles
public io.delta.kernel.utils.CloseableIterator<io.delta.kernel.engine.FileReadResult> readParquetFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> fileIter, io.delta.kernel.types.StructType physicalSchema, Optional<io.delta.kernel.expressions.Predicate> predicate) throws IOException - Specified by:
readParquetFilesin interfaceio.delta.kernel.engine.ParquetHandler- Throws:
IOException
-
writeParquetFiles
public io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.DataFileStatus> writeParquetFiles(String directoryPath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.FilteredColumnarBatch> dataIter, List<io.delta.kernel.expressions.Column> statsColumns) throws IOException - Specified by:
writeParquetFilesin interfaceio.delta.kernel.engine.ParquetHandler- Throws:
IOException
-
writeParquetFileAtomically
public void writeParquetFileAtomically(String filePath, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.FilteredColumnarBatch> data) throws IOException Makes use ofLogStoreimplementations in `delta-storage` to atomically write the data to a file depending upon the destination filesystem.- Specified by:
writeParquetFileAtomicallyin interfaceio.delta.kernel.engine.ParquetHandler- Parameters:
filePath- Fully qualified destination file pathdata- Iterator ofFilteredColumnarBatch- Throws:
IOException
-