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, SnapshotReport snapshotReport) -
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, SnapshotReport snapshotReport)
-
-
Method Details
-
getScanFiles
Get an iterator of data files in this version of scan that survived the predicate pruning.- Specified by:
getScanFiles
in interfaceScan
- Parameters:
engine
-Engine
instance to use in Delta Kernel.- Returns:
- data in
ColumnarBatch
batch format. Each row correspond to one survived file. - See Also:
-
getScanFiles
Get an iterator of data files in this version of scan that survived the predicate pruning.When
includeStats=true
the 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=false
the JSON file statistics may or may not be present in the returned columnar batches.- Parameters:
engine
- theEngine
instance to useincludeStats
- whether to read and include the JSON statistics- Returns:
- the surviving scan files as
FilteredColumnarBatch
s
-
getScanState
Description copied from interface:Scan
Get the scan state associated with the current scan. This state is common across all files in the scan to be read.- Specified by:
getScanState
in interfaceScan
- Parameters:
engine
-Engine
instance to use in Delta Kernel.- Returns:
- Scan state in
Row
format.
-
getRemainingFilter
Description copied from interface:Scan
Get 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:
getRemainingFilter
in interfaceScan
- Returns:
- the remaining filter as a
Predicate
.
-