Scan¶
Scan is an abstraction of logical scans over data sources.
Contract¶
Description¶
Human-readable description of this scan (e.g. for logging purposes).
default: the fully-qualified class name
Used when:
BatchScanExecphysical operator is requested for the simpleStringDataSourceV2ScanExecBasephysical operator is requested for the simpleString and verboseStringWithOperatorId
Read Schema¶
Read schema of this scan
Used when:
FileScanis requested for the partition and data filtersGroupBasedRowLevelOperationScanPlanningis executedPushDownUtilsutility is used to pruneColumns- V2ScanRelationPushDown logical optimization is executed (and requested to pushDownAggregates)
Supported Custom Metrics¶
Empty by default and expected to be overriden by implementations
See:
Used when:
DataSourceV2ScanExecBasephysical operator is requested for the custom metrics
Physical Representation for Batch Query¶
By default, toBatch throws an UnsupportedOperationException (with the description):
See:
Must be implemented (overriden), if the Table that created this Scan has BATCH_READ capability (among the capabilities).
Used when:
BatchScanExecphysical operator is requested for the Batch and the filteredPartitions
Converting to ContinuousStream¶
By default, toContinuousStream throws an UnsupportedOperationException (with the description):
Must be implemented (overriden), if the Table that created this Scan has CONTINUOUS_READ capability (among the capabilities).
Used when:
ContinuousExecution(Spark Structured Streaming) is requested for the logical plan (WriteToContinuousDataSource)
Converting to MicroBatchStream¶
By default, toMicroBatchStream throws an UnsupportedOperationException (with the description):
Must be implemented (overriden), if the Table that created this Scan has MICRO_BATCH_READ capability (among the capabilities).
Used when:
MicroBatchExecution(Spark Structured Streaming) is requested for the logical plan