Package org.apache.iceberg
Class SnapshotScan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
- java.lang.Object
- 
- org.apache.iceberg.SnapshotScan<ThisT,T,G>
 
- 
- Type Parameters:
- ThisT- actual BaseScan implementation class type
- T- type of ScanTask returned
- G- type of ScanTaskGroup returned
 - All Implemented Interfaces:
- Scan<ThisT,T,G>
 - Direct Known Subclasses:
- AllDataFilesTable.AllDataFilesTableScan,- AllDeleteFilesTable.AllDeleteFilesTableScan,- AllFilesTable.AllFilesTableScan,- AllManifestsTable.AllManifestsTableScan,- DataFilesTable.DataFilesTableScan,- DataTableScan,- DeleteFilesTable.DeleteFilesTableScan,- FilesTable.FilesTableScan,- PositionDeletesTable.PositionDeletesBatchScan
 
 public abstract class SnapshotScan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>> extends java.lang.ObjectThis is a common base class to share code between different BaseScan implementations that handle scans of a particular snapshot.
- 
- 
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_COLUMNS
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSnapshotScan(Table table, Schema schema, org.apache.iceberg.TableScanContext context)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ThisTasOfTime(long timestampMillis)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 org.apache.iceberg.TableScanContextcontext()protected abstract CloseableIterable<T>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.booleanisCaseSensitive()Returns whether this scan is case-sensitive with respect to column names.protected ThisTnewRefinedScan(TableOperations ignored, Table newTable, Schema newSchema, org.apache.iceberg.TableScanContext newContext)Deprecated.will be removed in 1.3.0; use newRefinedScan(Table, Schema, TableScanContext) instead.protected abstract ThisTnewRefinedScan(Table newTable, Schema newSchema, org.apache.iceberg.TableScanContext newContext)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<T>planFiles()Plan tasks for this scan where each task reads a single file.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 java.util.List<java.lang.String>scanColumns()protected ScanMetricsscanMetrics()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()Snapshotsnapshot()protected java.lang.LongsnapshotId()intsplitLookback()Returns the split lookback for this scan.longsplitOpenFileCost()Returns the split open file cost for this scan.Tabletable()protected TableOperationstableOps()Deprecated.will be removed in 1.3.0; avoid using TableOperations for scans or use BaseTableprotected SchematableSchema()longtargetSplitSize()Returns the target split size for this scan.java.lang.StringtoString()ThisTuseRef(java.lang.String name)ThisTuseSnapshot(long scanSnapshotId)
 
- 
- 
- 
Method Detail- 
snapshotIdprotected java.lang.Long snapshotId() 
 - 
doPlanFilesprotected abstract CloseableIterable<T> doPlanFiles() 
 - 
scanMetricsprotected ScanMetrics scanMetrics() 
 - 
useSnapshotpublic ThisT useSnapshot(long scanSnapshotId) 
 - 
useRefpublic ThisT useRef(java.lang.String name) 
 - 
asOfTimepublic ThisT asOfTime(long timestampMillis) 
 - 
planFilespublic CloseableIterable<T> 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.- Returns:
- an Iterable of tasks scanning entire files required by this scan
 
 - 
snapshotpublic Snapshot snapshot() 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
tableOps@Deprecated protected TableOperations tableOps() Deprecated.will be removed in 1.3.0; avoid using TableOperations for scans or use BaseTable
 - 
tablepublic Table table() 
 - 
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() 
 - 
shouldIgnoreResidualsprotected boolean shouldIgnoreResiduals() 
 - 
shouldPlanWithExecutorprotected boolean shouldPlanWithExecutor() 
 - 
planExecutorprotected java.util.concurrent.ExecutorService planExecutor() 
 - 
newRefinedScan@Deprecated protected ThisT newRefinedScan(TableOperations ignored, Table newTable, Schema newSchema, org.apache.iceberg.TableScanContext newContext) Deprecated.will be removed in 1.3.0; use newRefinedScan(Table, Schema, TableScanContext) instead.
 - 
newRefinedScanprotected abstract ThisT newRefinedScan(Table newTable, Schema newSchema, org.apache.iceberg.TableScanContext newContext) 
 - 
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.
 
 - 
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
 
 - 
targetSplitSizepublic long targetSplitSize() Description copied from interface:ScanReturns the target split size for this scan.- Specified by:
- targetSplitSizein interface- Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>
 
 - 
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>>
 
 
- 
 
-