@Evolving public interface FileHandler
Modifier and Type | Method and Description |
---|---|
CloseableIterator<FileReadContext> |
contextualizeFileReads(CloseableIterator<Row> fileIter,
Predicate predicate)
Associates a connector specific
FileReadContext for each scan file represented by a
Row in fileIter . |
CloseableIterator<FileReadContext> contextualizeFileReads(CloseableIterator<Row> fileIter, Predicate predicate)
FileReadContext
for each scan file represented by a
Row
in fileIter
. Delta Kernel will supply the returned
FileReadContext
s back to the connector when reading the file (for example, in
ParquetHandler.readParquetFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.client.FileReadContext>, io.delta.kernel.types.StructType)
). Delta Kernel does not interpret
FileReadContext
.
For example, a connector can attach split information in its own implementation
of FileReadContext
or attach any predicates.
fileIter
- iterator of scan files where each Row
contains FileStatus
informationpredicate
- Predicate to prune data. This is optional for the connector to use for
further optimization. Filtering by this predicate is not required.