Class DataTableScan
- java.lang.Object
- 
- org.apache.iceberg.DataTableScan
 
- 
- All Implemented Interfaces:
- TableScan
 
 public class DataTableScan extends java.lang.Object
- 
- 
Constructor SummaryConstructors Modifier Constructor Description DataTableScan(TableOperations ops, Table table)protectedDataTableScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context)
 - 
Method SummaryAll 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.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()intsplitLookback()Returns the split lookback for this scan.longsplitOpenFileCost()Returns the split open file cost for this scan.Tabletable()Returns theTablefrom which this scan loads data.protected TableOperationstableOps()protected SchematableSchema()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.
 
- 
- 
- 
Constructor Detail- 
DataTableScanpublic DataTableScan(TableOperations ops, Table table) 
 - 
DataTableScanprotected DataTableScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context) 
 
- 
 - 
Method Detail- 
appendsBetweenpublic TableScan appendsBetween(long fromSnapshotId, long toSnapshotId) Description copied from interface:TableScanCreate a newTableScanto read appended data fromfromSnapshotIdexclusive totoSnapshotIdinclusive.- Specified by:
- appendsBetweenin interface- TableScan
- Parameters:
- fromSnapshotId- the last snapshot id read by the user, exclusive
- toSnapshotId- read append data up to this snapshot id
- Returns:
- a table scan which can read append data from fromSnapshotIdexclusive and up totoSnapshotIdinclusive
 
 - 
appendsAfterpublic TableScan appendsAfter(long fromSnapshotId) Description copied from interface:TableScanCreate a newTableScanto read appended data fromfromSnapshotIdexclusive to the current snapshot inclusive.- Specified by:
- appendsAfterin interface- TableScan
- 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
 
 - 
useSnapshotpublic 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 interface- TableScan
- Parameters:
- scanSnapshotId- a snapshot ID
- Returns:
- a new scan based on this with the given snapshot ID
 
 - 
newRefinedScanprotected TableScan newRefinedScan(TableOperations ops, Table table, Schema schema, org.apache.iceberg.TableScanContext context) 
 - 
planFilespublic CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean ignoreResiduals, boolean caseSensitive, boolean colStats) 
 - 
targetSplitSizepublic long targetSplitSize() Description copied from interface:TableScanReturns the target split size for this scan.
 - 
tableSchemaprotected Schema tableSchema() 
 - 
tableOpsprotected TableOperations tableOps() 
 - 
snapshotIdprotected java.lang.Long snapshotId() 
 - 
colStatsprotected boolean colStats() 
 - 
shouldIgnoreResidualsprotected boolean shouldIgnoreResiduals() 
 - 
selectedColumnsprotected java.util.Collection<java.lang.String> selectedColumns() 
 - 
optionsprotected java.util.Map<java.lang.String,java.lang.String> options() 
 - 
contextprotected org.apache.iceberg.TableScanContext context() 
 - 
tablepublic Table table() Description copied from interface:TableScanReturns theTablefrom which this scan loads data.
 - 
asOfTimepublic 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.
 - 
optionpublic TableScan option(java.lang.String property, java.lang.String value) Description copied from interface:TableScan
 - 
projectpublic TableScan project(Schema projectedSchema) Description copied from interface:TableScanCreate a newTableScanfrom this with the schema as its projection.
 - 
caseSensitivepublic 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 interface- TableScan
- Returns:
- a new scan based on this with case sensitivity as stated
 
 - 
includeColumnStatspublic 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 interface- TableScan
- Returns:
- a new scan based on this that loads column stats.
 
 - 
selectpublic 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.
 - 
filterpublic TableScan filter(Expression expr) Description copied from interface:TableScanCreate a newTableScanfrom the results of this filtered by theExpression.
 - 
filterpublic Expression filter() Description copied from interface:TableScanReturns this scan's filterExpression.
 - 
ignoreResidualspublic 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 interface- TableScan
- Returns:
- a new scan based on this that does not filter rows in files.
 
 - 
planFilespublic 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.
 - 
planTaskspublic 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. 
 - 
splitLookbackpublic int splitLookback() Description copied from interface:TableScanReturns the split lookback for this scan.- Specified by:
- splitLookbackin interface- TableScan
 
 - 
splitOpenFileCostpublic long splitOpenFileCost() Description copied from interface:TableScanReturns the split open file cost for this scan.- Specified by:
- splitOpenFileCostin interface- TableScan
 
 - 
schemapublic 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.
 - 
snapshotpublic 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.
 - 
isCaseSensitivepublic boolean isCaseSensitive() Description copied from interface:TableScanReturns whether this scan should apply column name case sensitiveness as perTableScan.caseSensitive(boolean).- Specified by:
- isCaseSensitivein interface- TableScan
- Returns:
- true if case sensitive, false otherwise.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-