Package org.apache.iceberg
Interface BatchScan
-
- All Superinterfaces:
Scan<BatchScan,ScanTask,ScanTaskGroup<ScanTask>>
- All Known Implementing Classes:
PositionDeletesTable.PositionDeletesBatchScan
,SparkDistributedDataScan
public interface BatchScan extends Scan<BatchScan,ScanTask,ScanTaskGroup<ScanTask>>
API for configuring a batch scan.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BatchScan
asOfTime(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
snapshot()
Returns theSnapshot
that will be used by this scan.Table
table()
Returns theTable
from which this scan loads data.BatchScan
useRef(java.lang.String ref)
Create a newBatchScan
from this scan's configuration that will use the given reference.BatchScan
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 Detail
-
useSnapshot
BatchScan useSnapshot(long snapshotId)
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:
java.lang.IllegalArgumentException
- if the snapshot cannot be found
-
useRef
BatchScan useRef(java.lang.String ref)
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:
java.lang.IllegalArgumentException
- if the reference with the given name could not be found
-
asOfTime
BatchScan asOfTime(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.- Parameters:
timestampMillis
- a timestamp in milliseconds- Returns:
- a new scan based on this with the current snapshot at the given time
- Throws:
java.lang.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
-
-