Package org.apache.iceberg
Class AllDataFilesTable.AllDataFilesTableScan
- java.lang.Object
- 
- org.apache.iceberg.SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
- 
- org.apache.iceberg.AllDataFilesTable.AllDataFilesTableScan
 
 
- 
- All Implemented Interfaces:
- Scan<TableScan,FileScanTask,CombinedScanTask>,- TableScan
 - Enclosing class:
- AllDataFilesTable
 
 public static class AllDataFilesTable.AllDataFilesTableScan extends SnapshotScan<TableScan,FileScanTask,CombinedScanTask> 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.util.List<java.lang.String>DELETE_SCAN_COLUMNSprotected static java.util.List<java.lang.String>DELETE_SCAN_WITH_STATS_COLUMNSprotected static booleanPLAN_SCANS_WITH_WORKER_POOLprotected static java.util.List<java.lang.String>SCAN_COLUMNSprotected static java.util.List<java.lang.String>SCAN_WITH_STATS_COLUMNS
 - 
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 on the branch in the scan or main if no branch is set.ThisTcaseSensitive(boolean caseSensitive)Create a new scan from this that, if data columns where selected viaScan.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.TableScanContextcontext()protected CloseableIterable<FileScanTask>doPlanFiles()Expressionfilter()Returns this scan's filterExpression.ThisTfilter(Expression expr)Create a new scan from the results of this filtered by theExpression.ThisTignoreResiduals()Create a new scan from this that applies data filtering to files but not to rows in those files.ThisTincludeColumnStats()Create a new scan from this that loads the column stats with each data file.ThisTincludeColumnStats(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 FileIOio()booleanisCaseSensitive()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 scanThisTmetricsReporter(MetricsReporter reporter)Create a new scan that will report scan metrics to the provided reporter in addition to reporters maintained by the scan.protected TableScannewRefinedScan(Table table, Schema schema, org.apache.iceberg.TableScanContext context)ThisToption(java.lang.String property, java.lang.String value)Create a new scan from this scan's configuration that will override theTable's behavior based on the incoming pair.protected java.util.Map<java.lang.String,java.lang.String>options()protected java.util.concurrent.ExecutorServiceplanExecutor()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.ThisTplanWith(java.util.concurrent.ExecutorService executorService)Create a new scan to use a particular executor to plan.ThisTproject(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 ExpressionresidualFilter()protected java.util.List<java.lang.String>scanColumns()Schemaschema()Returns this scan's projectionSchema.ThisTselect(java.util.Collection<java.lang.String> columns)Create a new scan from this that will read the given data columns.protected booleanshouldIgnoreResiduals()protected booleanshouldPlanWithExecutor()protected booleanshouldReturnColumnStats()intsplitLookback()Returns the split lookback for this scan.longsplitOpenFileCost()Returns the split open file cost for this scan.Tabletable()protected SchematableSchema()protected MetadataTableTypetableType()Type of scan being performed, such asMetadataTableType.ALL_DATA_FILESwhen scanning a table'sAllDataFilesTable.longtargetSplitSize()Returns the target split size for this scan.TableScanuseRef(java.lang.String ref)Create a newTableScanfrom this scan's configuration that will use the given reference.TableScanuseSnapshot(long scanSnapshotId)Create a newTableScanfrom this scan's configuration that will use the given snapshot by ID.- 
Methods inherited from class org.apache.iceberg.SnapshotScanscanMetrics, snapshot, snapshotId, toString, useSnapshotSchema
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.iceberg.ScancaseSensitive, filter, filter, ignoreResiduals, includeColumnStats, includeColumnStats, isCaseSensitive, metricsReporter, option, planWith, project, schema, select, select, splitLookback, splitOpenFileCost
 
- 
 
- 
- 
- 
Field Detail- 
SCAN_COLUMNSprotected static final java.util.List<java.lang.String> SCAN_COLUMNS 
 - 
SCAN_WITH_STATS_COLUMNSprotected static final java.util.List<java.lang.String> SCAN_WITH_STATS_COLUMNS 
 - 
DELETE_SCAN_COLUMNSprotected static final java.util.List<java.lang.String> DELETE_SCAN_COLUMNS 
 - 
DELETE_SCAN_WITH_STATS_COLUMNSprotected static final java.util.List<java.lang.String> DELETE_SCAN_WITH_STATS_COLUMNS 
 - 
PLAN_SCANS_WITH_WORKER_POOLprotected static final boolean PLAN_SCANS_WITH_WORKER_POOL 
 
- 
 - 
Method Detail- 
newRefinedScanprotected TableScan newRefinedScan(Table table, Schema schema, org.apache.iceberg.TableScanContext context) 
 - 
manifestsprotected CloseableIterable<ManifestFile> manifests() Returns an iterable of manifest files to explore for this all files metadata table scan
 - 
doPlanFilesprotected CloseableIterable<FileScanTask> doPlanFiles() - Specified by:
- doPlanFilesin class- SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
 
 - 
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
- Overrides:
- useSnapshotin class- SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
- Parameters:
- scanSnapshotId- a snapshot ID
- Returns:
- a new scan based on this with the given snapshot ID
 
 - 
useRefpublic TableScan useRef(java.lang.String ref) Description copied from interface:TableScanCreate a newTableScanfrom this scan's configuration that will use the given reference.- Specified by:
- useRefin interface- TableScan
- Overrides:
- useRefin class- SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
- Parameters:
- ref- reference
- Returns:
- a new scan based on the given reference.
 
 - 
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 on the branch in the scan or main if no branch is set.- Specified by:
- asOfTimein interface- TableScan
- Overrides:
- asOfTimein class- SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
- Parameters:
- timestampMillis- a timestamp in milliseconds.
- Returns:
- a new scan based on this with the current snapshot at the given time
 
 - 
planFilespublic CloseableIterable<FileScanTask> planFiles() Description copied from interface:ScanPlan tasks for this scan where each task reads a single file.Use Scan.planTasks()for planning balanced tasks where each task will read either a single file, a part of a file, or multiple files.- Specified by:
- planFilesin interface- Scan<TableScan,FileScanTask,CombinedScanTask>
- Overrides:
- planFilesin class- SnapshotScan<TableScan,FileScanTask,CombinedScanTask>
- Returns:
- an Iterable of tasks scanning entire files required by this scan
 
 - 
reachableManifestsprotected CloseableIterable<ManifestFile> reachableManifests(org.apache.iceberg.relocated.com.google.common.base.Function<Snapshot,java.lang.Iterable<ManifestFile>> toManifests) 
 - 
tableTypeprotected MetadataTableType tableType() Type of scan being performed, such asMetadataTableType.ALL_DATA_FILESwhen scanning a table'sAllDataFilesTable.Used for logging and error messages. 
 - 
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
 
 - 
targetSplitSizepublic long targetSplitSize() Description copied from interface:ScanReturns the target split size for this scan.- Specified by:
- targetSplitSizein interface- Scan<TableScan,FileScanTask,CombinedScanTask>
 
 - 
planTaskspublic CloseableIterable<CombinedScanTask> planTasks() Description copied from interface:ScanPlan balanced task groups for this scan by splitting large and combining small tasks.Task groups created by this method may read partial input files, multiple input files or both. - Specified by:
- planTasksin interface- Scan<TableScan,FileScanTask,CombinedScanTask>
- Returns:
- an Iterable of balanced task groups required by this scan
 
 - 
tablepublic Table table() 
 - 
ioprotected FileIO io() 
 - 
tableSchemaprotected Schema tableSchema() 
 - 
contextprotected org.apache.iceberg.TableScanContext context() 
 - 
optionsprotected java.util.Map<java.lang.String,java.lang.String> options() 
 - 
scanColumnsprotected java.util.List<java.lang.String> scanColumns() 
 - 
shouldReturnColumnStatsprotected boolean shouldReturnColumnStats() 
 - 
columnsToKeepStatsprotected java.util.Set<java.lang.Integer> columnsToKeepStats() 
 - 
shouldIgnoreResidualsprotected boolean shouldIgnoreResiduals() 
 - 
residualFilterprotected Expression residualFilter() 
 - 
shouldPlanWithExecutorprotected boolean shouldPlanWithExecutor() 
 - 
planExecutorprotected java.util.concurrent.ExecutorService planExecutor() 
 - 
optionpublic ThisT option(java.lang.String property, java.lang.String value)Description copied from interface:ScanCreate a new scan from this scan's configuration that will override theTable's behavior based on the incoming pair. Unknown properties will be ignored.- Specified by:
- optionin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- property- name of the table property to be overridden
- value- value to override with
- Returns:
- a new scan based on this with overridden behavior
 
 - 
projectpublic ThisT project(Schema projectedSchema) Description copied from interface:ScanCreate a new scan from this with the schema as its projection.- Specified by:
- projectin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- projectedSchema- a projection schema
- Returns:
- a new scan based on this with the given projection
 
 - 
caseSensitivepublic ThisT caseSensitive(boolean caseSensitive) Description copied from interface:ScanCreate a new scan from this that, if data columns where selected viaScan.select(java.util.Collection), controls whether the match to the schema will be done with case sensitivity. Default is true.- Specified by:
- caseSensitivein interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- a new scan based on this with case sensitivity as stated
 
 - 
isCaseSensitivepublic boolean isCaseSensitive() Description copied from interface:ScanReturns whether this scan is case-sensitive with respect to column names.- Specified by:
- isCaseSensitivein interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- true if case-sensitive, false otherwise.
 
 - 
includeColumnStatspublic ThisT includeColumnStats() Description copied from interface:ScanCreate a new scan from 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- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- a new scan based on this that loads column stats.
 
 - 
includeColumnStatspublic ThisT includeColumnStats(java.util.Collection<java.lang.String> requestedColumns) Description copied from interface:ScanCreate a new scan from this that loads the column stats for the specific columns with each data file.Column stats include: value count, null value count, lower bounds, and upper bounds. - Specified by:
- includeColumnStatsin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- requestedColumns- column names for which to keep the stats.
- Returns:
- a new scan based on this that loads column stats for specific columns.
 
 - 
selectpublic ThisT select(java.util.Collection<java.lang.String> columns) Description copied from interface:ScanCreate a new scan 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.- Specified by:
- selectin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- columns- column names from the table's schema
- Returns:
- a new scan based on this with the given projection columns
 
 - 
filterpublic ThisT filter(Expression expr) Description copied from interface:ScanCreate a new scan from the results of this filtered by theExpression.- Specified by:
- filterin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- expr- a filter expression
- Returns:
- a new scan based on this with results filtered by the expression
 
 - 
filterpublic Expression filter() Description copied from interface:ScanReturns this scan's filterExpression.- Specified by:
- filterin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- this scan's filter expression
 
 - 
ignoreResidualspublic ThisT ignoreResiduals() Description copied from interface:ScanCreate a new scan from this that applies data filtering to files but not to rows in those files.- Specified by:
- ignoreResidualsin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- a new scan based on this that does not filter rows in files.
 
 - 
planWithpublic ThisT planWith(java.util.concurrent.ExecutorService executorService) Description copied from interface:ScanCreate a new scan to use a particular executor to plan. The default worker pool will be used by default.- Specified by:
- planWithin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Parameters:
- executorService- the provided executor
- Returns:
- a table scan that uses the provided executor to access manifests
 
 - 
schemapublic Schema schema() Description copied from interface:ScanReturns this scan's projectionSchema.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.- Specified by:
- schemain interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- Returns:
- this scan's projection schema
 
 - 
splitLookbackpublic int splitLookback() Description copied from interface:ScanReturns the split lookback for this scan.- Specified by:
- splitLookbackin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
 
 - 
splitOpenFileCostpublic long splitOpenFileCost() Description copied from interface:ScanReturns the split open file cost for this scan.- Specified by:
- splitOpenFileCostin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
 
 - 
metricsReporterpublic ThisT metricsReporter(MetricsReporter reporter) Description copied from interface:ScanCreate a new scan that will report scan metrics to the provided reporter in addition to reporters maintained by the scan.- Specified by:
- metricsReporterin interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
 
 
- 
 
-