public static class AllDeleteFilesTable.AllDeleteFilesTableScan extends SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<java.lang.String> |
DELETE_SCAN_COLUMNS |
protected static java.util.List<java.lang.String> |
DELETE_SCAN_WITH_STATS_COLUMNS |
protected static boolean |
PLAN_SCANS_WITH_WORKER_POOL |
protected static java.util.List<java.lang.String> |
SCAN_COLUMNS |
protected static java.util.List<java.lang.String> |
SCAN_WITH_STATS_COLUMNS |
Modifier and Type | Method and Description |
---|---|
TableScan |
appendsAfter(long fromSnapshotId)
Create a new
TableScan to read appended data from fromSnapshotId exclusive to
the current snapshot inclusive. |
TableScan |
appendsBetween(long fromSnapshotId,
long toSnapshotId)
Create a new
TableScan to read appended data from fromSnapshotId exclusive to
toSnapshotId inclusive. |
TableScan |
asOfTime(long timestampMillis)
Create a new
TableScan 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. |
ThisT |
caseSensitive(boolean caseSensitive)
Create a new scan from this that, if data columns where selected via
Scan.select(java.util.Collection) , controls whether the match to the schema will be done with case
sensitivity. |
protected java.util.Set<java.lang.Integer> |
columnsToKeepStats() |
protected org.apache.iceberg.TableScanContext |
context() |
protected CloseableIterable<FileScanTask> |
doPlanFiles() |
Expression |
filter()
Returns this scan's filter
Expression . |
ThisT |
filter(Expression expr)
Create a new scan from the results of this filtered by the
Expression . |
ThisT |
ignoreResiduals()
Create a new scan from this that applies data filtering to files but not to rows in those
files.
|
ThisT |
includeColumnStats()
Create a new scan from this that loads the column stats with each data file.
|
ThisT |
includeColumnStats(java.util.Collection<java.lang.String> requestedColumns)
Create a new scan from this that loads the column stats for the specific columns with each data
file.
|
protected FileIO |
io() |
boolean |
isCaseSensitive()
Returns whether this scan is case-sensitive with respect to column names.
|
protected CloseableIterable<ManifestFile> |
manifests()
Returns an iterable of manifest files to explore for this all files metadata table scan
|
ThisT |
metricsReporter(MetricsReporter reporter)
Create a new scan that will report scan metrics to the provided reporter in addition to
reporters maintained by the scan.
|
protected TableScan |
newRefinedScan(Table table,
Schema schema,
org.apache.iceberg.TableScanContext context) |
ThisT |
option(java.lang.String property,
java.lang.String value)
Create a new scan from this scan's configuration that will override the
Table 's
behavior based on the incoming pair. |
protected java.util.Map<java.lang.String,java.lang.String> |
options() |
protected java.util.concurrent.ExecutorService |
planExecutor() |
CloseableIterable<FileScanTask> |
planFiles()
Plan tasks for this scan where each task reads a single file.
|
CloseableIterable<CombinedScanTask> |
planTasks()
Plan balanced task groups for this scan by splitting large and combining small tasks.
|
ThisT |
planWith(java.util.concurrent.ExecutorService executorService)
Create a new scan to use a particular executor to plan.
|
ThisT |
project(Schema projectedSchema)
Create a new scan from this with the schema as its projection.
|
protected CloseableIterable<ManifestFile> |
reachableManifests(org.apache.iceberg.relocated.com.google.common.base.Function<Snapshot,java.lang.Iterable<ManifestFile>> toManifests) |
protected Expression |
residualFilter() |
protected java.util.List<java.lang.String> |
scanColumns() |
Schema |
schema()
Returns this scan's projection
Schema . |
ThisT |
select(java.util.Collection<java.lang.String> columns)
Create a new scan from this that will read the given data columns.
|
protected boolean |
shouldIgnoreResiduals() |
protected boolean |
shouldPlanWithExecutor() |
protected boolean |
shouldReturnColumnStats() |
int |
splitLookback()
Returns the split lookback for this scan.
|
long |
splitOpenFileCost()
Returns the split open file cost for this scan.
|
Table |
table() |
protected Schema |
tableSchema() |
protected MetadataTableType |
tableType()
Type of scan being performed, such as
MetadataTableType.ALL_DATA_FILES when scanning a
table's AllDataFilesTable . |
long |
targetSplitSize()
Returns the target split size for this scan.
|
TableScan |
useRef(java.lang.String ref)
Create a new
TableScan from this scan's configuration that will use the given
reference. |
TableScan |
useSnapshot(long scanSnapshotId)
Create a new
TableScan from this scan's configuration that will use the given snapshot
by ID. |
scanMetrics, snapshot, snapshotId, toString, useSnapshotSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
caseSensitive, filter, filter, ignoreResiduals, includeColumnStats, includeColumnStats, isCaseSensitive, metricsReporter, option, planWith, project, schema, select, select, splitLookback, splitOpenFileCost
protected static final java.util.List<java.lang.String> SCAN_COLUMNS
protected static final java.util.List<java.lang.String> SCAN_WITH_STATS_COLUMNS
protected static final java.util.List<java.lang.String> DELETE_SCAN_COLUMNS
protected static final java.util.List<java.lang.String> DELETE_SCAN_WITH_STATS_COLUMNS
protected static final boolean PLAN_SCANS_WITH_WORKER_POOL
protected TableScan newRefinedScan(Table table, Schema schema, org.apache.iceberg.TableScanContext context)
protected CloseableIterable<ManifestFile> manifests()
protected CloseableIterable<FileScanTask> doPlanFiles()
doPlanFiles
in class SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
public TableScan useSnapshot(long scanSnapshotId)
TableScan
TableScan
from this scan's configuration that will use the given snapshot
by ID.useSnapshot
in interface TableScan
useSnapshot
in class SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
scanSnapshotId
- a snapshot IDpublic TableScan useRef(java.lang.String ref)
TableScan
TableScan
from this scan's configuration that will use the given
reference.useRef
in interface TableScan
useRef
in class SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
ref
- referencepublic TableScan asOfTime(long timestampMillis)
TableScan
TableScan
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.asOfTime
in interface TableScan
asOfTime
in class SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
timestampMillis
- a timestamp in milliseconds.public CloseableIterable<FileScanTask> planFiles()
Scan
Use Scan.planTasks()
for planning balanced tasks where each task will read either a
single file, a part of a file, or multiple files.
planFiles
in interface Scan<TableScan,FileScanTask,CombinedScanTask>
planFiles
in class SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
protected CloseableIterable<ManifestFile> reachableManifests(org.apache.iceberg.relocated.com.google.common.base.Function<Snapshot,java.lang.Iterable<ManifestFile>> toManifests)
protected MetadataTableType tableType()
MetadataTableType.ALL_DATA_FILES
when scanning a
table's AllDataFilesTable
.
Used for logging and error messages.
public TableScan appendsBetween(long fromSnapshotId, long toSnapshotId)
TableScan
TableScan
to read appended data from fromSnapshotId
exclusive to
toSnapshotId
inclusive.appendsBetween
in interface TableScan
fromSnapshotId
- the last snapshot id read by the user, exclusivetoSnapshotId
- read append data up to this snapshot idfromSnapshotId
exclusive and up to
toSnapshotId
inclusivepublic TableScan appendsAfter(long fromSnapshotId)
TableScan
TableScan
to read appended data from fromSnapshotId
exclusive to
the current snapshot inclusive.appendsAfter
in interface TableScan
fromSnapshotId
- - the last snapshot id read by the user, exclusivefromSnapshotId
exclusive and up to
current snapshot inclusivepublic long targetSplitSize()
Scan
targetSplitSize
in interface Scan<TableScan,FileScanTask,CombinedScanTask>
public CloseableIterable<CombinedScanTask> planTasks()
Scan
Task groups created by this method may read partial input files, multiple input files or both.
planTasks
in interface Scan<TableScan,FileScanTask,CombinedScanTask>
public Table table()
protected FileIO io()
protected Schema tableSchema()
protected org.apache.iceberg.TableScanContext context()
protected java.util.Map<java.lang.String,java.lang.String> options()
protected java.util.List<java.lang.String> scanColumns()
protected boolean shouldReturnColumnStats()
protected java.util.Set<java.lang.Integer> columnsToKeepStats()
protected boolean shouldIgnoreResiduals()
protected Expression residualFilter()
protected boolean shouldPlanWithExecutor()
protected java.util.concurrent.ExecutorService planExecutor()
public ThisT option(java.lang.String property, java.lang.String value)
Scan
Table
's
behavior based on the incoming pair. Unknown properties will be ignored.option
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
property
- name of the table property to be overriddenvalue
- value to override withpublic ThisT project(Schema projectedSchema)
Scan
project
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
projectedSchema
- a projection schemapublic ThisT caseSensitive(boolean caseSensitive)
Scan
Scan.select(java.util.Collection)
, controls whether the match to the schema will be done with case
sensitivity. Default is true.caseSensitive
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public boolean isCaseSensitive()
Scan
isCaseSensitive
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public ThisT includeColumnStats()
Scan
Column stats include: value count, null value count, lower bounds, and upper bounds.
includeColumnStats
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public ThisT includeColumnStats(java.util.Collection<java.lang.String> requestedColumns)
Scan
Column stats include: value count, null value count, lower bounds, and upper bounds.
includeColumnStats
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
requestedColumns
- column names for which to keep the stats.public ThisT select(java.util.Collection<java.lang.String> columns)
Scan
select
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
columns
- column names from the table's schemapublic ThisT filter(Expression expr)
Scan
Expression
.filter
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
expr
- a filter expressionpublic Expression filter()
Scan
Expression
.filter
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public ThisT ignoreResiduals()
Scan
ignoreResiduals
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public ThisT planWith(java.util.concurrent.ExecutorService executorService)
Scan
planWith
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
executorService
- the provided executorpublic Schema schema()
Scan
Schema
.
If the projection schema was set directly using Scan.project(Schema)
, returns that
schema.
If the projection schema was set by calling Scan.select(Collection)
, returns a
projection schema that includes the selected data fields and any fields used in the filter
expression.
schema
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public int splitLookback()
Scan
splitLookback
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public long splitOpenFileCost()
Scan
splitOpenFileCost
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
public ThisT metricsReporter(MetricsReporter reporter)
Scan
metricsReporter
in interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>