Package io.delta.kernel.internal
Class ScanImpl
Object
io.delta.kernel.internal.ScanImpl
- All Implemented Interfaces:
Scan
Implementation of
Scan-
Constructor Summary
ConstructorsConstructorDescriptionScanImpl(StructType snapshotSchema, StructType readSchema, Protocol protocol, Metadata metadata, LogReplay logReplay, Optional<Predicate> filter, Path dataPath) -
Method Summary
Modifier and TypeMethodDescriptionGet the remaining filter that is not guaranteed to be satisfied for the data Delta Kernel returns.getScanFiles(Engine engine) Get an iterator of data files in this version of scan that survived the predicate pruning.getScanFiles(Engine engine, boolean includeStats) Get an iterator of data files in this version of scan that survived the predicate pruning.getScanState(Engine engine) Get the scan state associated with the current scan.
-
Constructor Details
-
ScanImpl
public ScanImpl(StructType snapshotSchema, StructType readSchema, Protocol protocol, Metadata metadata, LogReplay logReplay, Optional<Predicate> filter, Path dataPath)
-
-
Method Details
-
getScanFiles
Get an iterator of data files in this version of scan that survived the predicate pruning.- Specified by:
getScanFilesin interfaceScan- Parameters:
engine-Engineinstance to use in Delta Kernel.- Returns:
- data in
ColumnarBatchbatch format. Each row correspond to one survived file.
-
getScanFiles
Get an iterator of data files in this version of scan that survived the predicate pruning. WhenincludeStats=truethe JSON file statistics are always read from the log and included in the returned columnar batches which have schemaInternalScanFileUtils.SCAN_FILE_SCHEMA_WITH_STATS. WhenincludeStats=falsethe JSON file statistics may or may not be present in the returned columnar batches.- Parameters:
engine- theEngineinstance to useincludeStats- whether to read and include the JSON statistics- Returns:
- the surviving scan files as
FilteredColumnarBatchs
-
getScanState
Description copied from interface:ScanGet the scan state associated with the current scan. This state is common across all files in the scan to be read.- Specified by:
getScanStatein interfaceScan- Parameters:
engine-Engineinstance to use in Delta Kernel.- Returns:
- Scan state in
Rowformat.
-
getRemainingFilter
Description copied from interface:ScanGet the remaining filter that is not guaranteed to be satisfied for the data Delta Kernel returns. This filter is used by Delta Kernel to do data skipping when possible.- Specified by:
getRemainingFilterin interfaceScan- Returns:
- the remaining filter as a
Predicate.
-