Class AllManifestsTable.AllManifestsTableScan
- java.lang.Object
-
- org.apache.iceberg.AllManifestsTable.AllManifestsTableScan
-
- All Implemented Interfaces:
TableScan
- Enclosing class:
- AllManifestsTable
public static class AllManifestsTable.AllManifestsTableScan extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableScanappendsAfter(long fromSnapshotId)Create a newTableScanto read appended data fromfromSnapshotIdexclusive to the current snapshot inclusive.TableScanappendsBetween(long fromSnapshotId, long toSnapshotId)Create a newTableScanto read appended data fromfromSnapshotIdexclusive totoSnapshotIdinclusive.TableScanasOfTime(long timestampMillis)Create a newTableScanfrom this scan's configuration that will use the most recent snapshot as of the given time in milliseconds.TableScancaseSensitive(boolean scanCaseSensitive)Create a newTableScanfrom this that, if data columns where selected viaTableScan.select(java.util.Collection), controls whether the match to the schema will be done with case sensitivity.protected booleancolStats()protected org.apache.iceberg.TableScanContextcontext()Expressionfilter()Returns this scan's filterExpression.TableScanfilter(Expression expr)Create a newTableScanfrom the results of this filtered by theExpression.TableScanignoreResiduals()Create a newTableScanfrom this that applies data filtering to files but not to rows in those files.TableScanincludeColumnStats()Create a newTableScanfrom this that loads the column stats with each data file.booleanisCaseSensitive()Returns whether this scan should apply column name case sensitiveness as perTableScan.caseSensitive(boolean).protected TableScannewRefinedScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context)TableScanoption(java.lang.String property, java.lang.String value)protected java.util.Map<java.lang.String,java.lang.String>options()CloseableIterable<FileScanTask>planFiles()Plan thefilesthat 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 thetasksfor this scan.TableScanproject(Schema projectedSchema)Create a newTableScanfrom this with the schema as its projection.Schemaschema()Returns this scan's projectionSchema.TableScanselect(java.util.Collection<java.lang.String> columns)Create a newTableScanfrom this that will read the given data columns.protected java.util.Collection<java.lang.String>selectedColumns()protected booleanshouldIgnoreResiduals()Snapshotsnapshot()Returns theSnapshotthat will be used by this scan.protected java.lang.LongsnapshotId()Tabletable()Returns theTablefrom which this scan loads data.protected TableOperationstableOps()protected java.lang.StringtableType()Type of scan being performed, such asMetadataTableType.ALL_DATA_FILESwhen scanning a table'sAllDataFilesTable.longtargetSplitSize()Returns the target split size for this scan.java.lang.StringtoString()TableScanuseSnapshot(long scanSnapshotId)Create a newTableScanfrom this scan's configuration that will use the given snapshot by ID.
-
-
-
Method Detail
-
newRefinedScan
protected TableScan newRefinedScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context)
-
useSnapshot
public TableScan useSnapshot(long scanSnapshotId)
Description copied from interface:TableScanCreate a newTableScanfrom this scan's configuration that will use the given snapshot by ID.- Specified by:
useSnapshotin interfaceTableScan- Parameters:
scanSnapshotId- a snapshot ID- Returns:
- a new scan based on this with the given snapshot ID
-
asOfTime
public TableScan asOfTime(long timestampMillis)
Description copied from interface:TableScanCreate a newTableScanfrom this scan's configuration that will use the most recent snapshot as of the given time in milliseconds.
-
tableType
protected java.lang.String tableType()
Type of scan being performed, such asMetadataTableType.ALL_DATA_FILESwhen scanning a table'sAllDataFilesTable.Used for logging and error messages.
-
targetSplitSize
public long targetSplitSize()
Description copied from interface:TableScanReturns the target split size for this scan.
-
planFiles
protected CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean ignoreResiduals, boolean caseSensitive, boolean colStats)
-
appendsBetween
public TableScan appendsBetween(long fromSnapshotId, long toSnapshotId)
Description copied from interface:TableScanCreate a newTableScanto read appended data fromfromSnapshotIdexclusive totoSnapshotIdinclusive.- Specified by:
appendsBetweenin interfaceTableScan- Parameters:
fromSnapshotId- the last snapshot id read by the user, exclusivetoSnapshotId- read append data up to this snapshot id- Returns:
- a table scan which can read append data from
fromSnapshotIdexclusive and up totoSnapshotIdinclusive
-
appendsAfter
public TableScan appendsAfter(long fromSnapshotId)
Description copied from interface:TableScanCreate a newTableScanto read appended data fromfromSnapshotIdexclusive to the current snapshot inclusive.- Specified by:
appendsAfterin interfaceTableScan- Parameters:
fromSnapshotId- - the last snapshot id read by the user, exclusive- Returns:
- a table scan which can read append data from
fromSnapshotIdexclusive and up to current snapshot inclusive
-
planFiles
public CloseableIterable<FileScanTask> planFiles()
Description copied from interface:TableScanPlan thefilesthat 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.
-
tableOps
protected TableOperations tableOps()
-
snapshotId
protected java.lang.Long snapshotId()
-
colStats
protected boolean colStats()
-
shouldIgnoreResiduals
protected boolean shouldIgnoreResiduals()
-
selectedColumns
protected java.util.Collection<java.lang.String> selectedColumns()
-
options
protected java.util.Map<java.lang.String,java.lang.String> options()
-
context
protected org.apache.iceberg.TableScanContext context()
-
table
public Table table()
Description copied from interface:TableScanReturns theTablefrom which this scan loads data.
-
option
public TableScan option(java.lang.String property, java.lang.String value)
Description copied from interface:TableScan
-
project
public TableScan project(Schema projectedSchema)
Description copied from interface:TableScanCreate a newTableScanfrom this with the schema as its projection.
-
caseSensitive
public TableScan caseSensitive(boolean scanCaseSensitive)
Description copied from interface:TableScanCreate a newTableScanfrom this that, if data columns where selected viaTableScan.select(java.util.Collection), controls whether the match to the schema will be done with case sensitivity.- Specified by:
caseSensitivein interfaceTableScan- Returns:
- a new scan based on this with case sensitivity as stated
-
includeColumnStats
public TableScan includeColumnStats()
Description copied from interface:TableScanCreate a newTableScanfrom this that loads the column stats with each data file.Column stats include: value count, null value count, lower bounds, and upper bounds.
- Specified by:
includeColumnStatsin interfaceTableScan- Returns:
- a new scan based on this that loads column stats.
-
select
public TableScan select(java.util.Collection<java.lang.String> columns)
Description copied from interface:TableScanCreate a newTableScanfrom 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.
-
filter
public TableScan filter(Expression expr)
Description copied from interface:TableScanCreate a newTableScanfrom the results of this filtered by theExpression.
-
filter
public Expression filter()
Description copied from interface:TableScanReturns this scan's filterExpression.
-
ignoreResiduals
public TableScan ignoreResiduals()
Description copied from interface:TableScanCreate a newTableScanfrom this that applies data filtering to files but not to rows in those files.- Specified by:
ignoreResidualsin interfaceTableScan- Returns:
- a new scan based on this that does not filter rows in files.
-
planTasks
public CloseableIterable<CombinedScanTask> planTasks()
Description copied from interface:TableScanPlan thetasksfor this scan.Tasks created by this method may read partial input files, multiple input files, or both.
-
schema
public Schema schema()
Description copied from interface:TableScanReturns this scan's projectionSchema.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.
-
snapshot
public Snapshot snapshot()
Description copied from interface:TableScanReturns theSnapshotthat will be used by this scan.If the snapshot was not configured using
TableScan.asOfTime(long)orTableScan.useSnapshot(long), the current table snapshot will be used.
-
isCaseSensitive
public boolean isCaseSensitive()
Description copied from interface:TableScanReturns whether this scan should apply column name case sensitiveness as perTableScan.caseSensitive(boolean).- Specified by:
isCaseSensitivein interfaceTableScan- Returns:
- true if case sensitive, false otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-