public static class AllDataFilesTable.AllDataFilesTableScan
extends java.lang.Object
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. |
TableScan |
caseSensitive(boolean scanCaseSensitive)
Create a new
TableScan from this that, if data columns where selected
via TableScan.select(java.util.Collection) , controls whether the match to the schema will be done
with case sensitivity. |
protected boolean |
colStats() |
protected org.apache.iceberg.TableScanContext |
context() |
Expression |
filter()
Returns this scan's filter
Expression . |
TableScan |
filter(Expression expr)
Create a new
TableScan from the results of this filtered by the Expression . |
TableScan |
ignoreResiduals()
Create a new
TableScan from this that applies data filtering to files but not to rows in those files. |
TableScan |
includeColumnStats()
Create a new
TableScan from this that loads the column stats with each data file. |
boolean |
isCaseSensitive()
Returns whether this scan should apply column name case sensitiveness as per
TableScan.caseSensitive(boolean) . |
protected TableScan |
newRefinedScan(TableOperations ops,
Table table,
Schema schema,
org.apache.iceberg.TableScanContext context) |
TableScan |
option(java.lang.String property,
java.lang.String value)
|
protected java.util.Map<java.lang.String,java.lang.String> |
options() |
CloseableIterable<FileScanTask> |
planFiles()
Plan the
files that will be read by this scan. |
protected CloseableIterable<FileScanTask> |
planFiles(TableOperations ops,
Snapshot snapshot,
Expression rowFilter,
boolean ignoreResiduals,
boolean caseSensitive,
boolean colStats) |
CloseableIterable<CombinedScanTask> |
planTasks()
Plan the
tasks for this scan. |
TableScan |
project(Schema projectedSchema)
Create a new
TableScan from this with the schema as its projection. |
Schema |
schema()
Returns this scan's projection
Schema . |
TableScan |
select(java.util.Collection<java.lang.String> columns)
Create a new
TableScan from this that will read the given data columns. |
protected java.util.Collection<java.lang.String> |
selectedColumns() |
protected boolean |
shouldIgnoreResiduals() |
Snapshot |
snapshot()
Returns the
Snapshot that will be used by this scan. |
protected java.lang.Long |
snapshotId() |
Table |
table()
Returns the
Table from which this scan loads data. |
protected TableOperations |
tableOps() |
protected long |
targetSplitSize(TableOperations ops) |
java.lang.String |
toString() |
TableScan |
useSnapshot(long scanSnapshotId)
Create a new
TableScan from this scan's configuration that will use the given snapshot
by ID. |
protected TableScan newRefinedScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context)
public TableScan useSnapshot(long scanSnapshotId)
TableScan
TableScan
from this scan's configuration that will use the given snapshot
by ID.useSnapshot
in interface TableScan
scanSnapshotId
- a snapshot IDpublic 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.protected long targetSplitSize(TableOperations ops)
protected CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean ignoreResiduals, boolean caseSensitive, boolean colStats)
public CloseableIterable<FileScanTask> planFiles()
TableScan
files
that will be read by this scan.
Each file has a residual expression that should be applied to filter the file's rows.
This simple plan returns file scans for each file from position 0 to the file's length. For
planning that will combine small files, split large files, and attempt to balance work, use
TableScan.planTasks()
instead.
protected TableOperations tableOps()
protected java.lang.Long snapshotId()
protected boolean colStats()
protected boolean shouldIgnoreResiduals()
protected java.util.Collection<java.lang.String> selectedColumns()
protected java.util.Map<java.lang.String,java.lang.String> options()
protected org.apache.iceberg.TableScanContext context()
public Table table()
TableScan
Table
from which this scan loads data.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 TableScan option(java.lang.String property, java.lang.String value)
TableScan
public TableScan project(Schema projectedSchema)
TableScan
TableScan
from this with the schema as its projection.public TableScan caseSensitive(boolean scanCaseSensitive)
TableScan
TableScan
from this that, if data columns where selected
via TableScan.select(java.util.Collection)
, controls whether the match to the schema will be done
with case sensitivity.caseSensitive
in interface TableScan
public TableScan includeColumnStats()
TableScan
TableScan
from this that loads the column stats with each data file.
Column stats include: value count, null value count, lower bounds, and upper bounds.
includeColumnStats
in interface TableScan
public TableScan select(java.util.Collection<java.lang.String> columns)
TableScan
TableScan
from this that will read the given data columns. This produces
an expected schema that includes all fields that are either selected or used by this scan's
filter expression.public TableScan filter(Expression expr)
TableScan
TableScan
from the results of this filtered by the Expression
.public Expression filter()
TableScan
Expression
.public TableScan ignoreResiduals()
TableScan
TableScan
from this that applies data filtering to files but not to rows in those files.ignoreResiduals
in interface TableScan
public CloseableIterable<CombinedScanTask> planTasks()
TableScan
tasks
for this scan.
Tasks created by this method may read partial input files, multiple input files, or both.
public Schema schema()
TableScan
Schema
.
If the projection schema was set directly using TableScan.project(Schema)
, returns that schema.
If the projection schema was set by calling TableScan.select(Collection)
, returns a projection
schema that includes the selected data fields and any fields used in the filter expression.
public Snapshot snapshot()
TableScan
Snapshot
that will be used by this scan.
If the snapshot was not configured using TableScan.asOfTime(long)
or TableScan.useSnapshot(long)
, the current table
snapshot will be used.
public boolean isCaseSensitive()
TableScan
TableScan.caseSensitive(boolean)
.isCaseSensitive
in interface TableScan
public java.lang.String toString()
toString
in class java.lang.Object