Package org.apache.iceberg
Interface BatchScan
- All Superinterfaces:
Scan<BatchScan,
ScanTask, ScanTaskGroup<ScanTask>>
- All Known Implementing Classes:
PositionDeletesTable.PositionDeletesBatchScan
,SparkDistributedDataScan
API for configuring a batch scan.
-
Method Summary
Modifier and TypeMethodDescriptionasOfTime
(long timestampMillis) Create a newBatchScan
from this scan's configuration that will use the most recent snapshot as of the given time in milliseconds on the branch in the scan or main if no branch is set.snapshot()
Returns theSnapshot
that will be used by this scan.table()
Returns theTable
from which this scan loads data.Create a newBatchScan
from this scan's configuration that will use the given reference.useSnapshot
(long snapshotId) Create a newBatchScan
from this scan's configuration that will use a snapshot with the given ID.Methods inherited from interface org.apache.iceberg.Scan
caseSensitive, filter, filter, ignoreResiduals, includeColumnStats, includeColumnStats, isCaseSensitive, metricsReporter, option, planFiles, planTasks, planWith, project, schema, select, select, splitLookback, splitOpenFileCost, targetSplitSize
-
Method Details
-
table
Table table()Returns theTable
from which this scan loads data.- Returns:
- this scan's table
-
useSnapshot
Create a newBatchScan
from this scan's configuration that will use a snapshot with the given ID.- Parameters:
snapshotId
- a snapshot ID- Returns:
- a new scan based on this with the given snapshot ID
- Throws:
IllegalArgumentException
- if the snapshot cannot be found
-
useRef
Create a newBatchScan
from this scan's configuration that will use the given reference.- Parameters:
ref
- a reference- Returns:
- a new scan based on this with the given reference
- Throws:
IllegalArgumentException
- if the reference with the given name could not be found
-
asOfTime
Create a newBatchScan
from this scan's configuration that will use the most recent snapshot as of the given time in milliseconds on the branch in the scan or main if no branch is set.- Parameters:
timestampMillis
- a timestamp in milliseconds- Returns:
- a new scan based on this with the current snapshot at the given time
- Throws:
IllegalArgumentException
- if the snapshot cannot be found or time travel is attempted on a tag
-
snapshot
Snapshot snapshot()Returns theSnapshot
that will be used by this scan.If the snapshot was not configured using
asOfTime(long)
oruseSnapshot(long)
, the current table snapshot will be used.- Returns:
- the Snapshot this scan will use
-