Package org.apache.iceberg
Interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>  
- Type Parameters:
- ThisT- the child Java API class, returned by method chaining
- T- the Java type of tasks produces by this scan
- G- the Java type of task groups produces by this scan
- All Known Subinterfaces:
- BatchScan,- IncrementalAppendScan,- IncrementalChangelogScan,- IncrementalScan<ThisT,,- T, - G> - TableScan
- All Known Implementing Classes:
- AllDataFilesTable.AllDataFilesTableScan,- AllDeleteFilesTable.AllDeleteFilesTableScan,- AllFilesTable.AllFilesTableScan,- AllManifestsTable.AllManifestsTableScan,- DataFilesTable.DataFilesTableScan,- DataTableScan,- DeleteFilesTable.DeleteFilesTableScan,- FilesTable.FilesTableScan,- PositionDeletesTable.PositionDeletesBatchScan,- SnapshotScan,- SparkDistributedDataScan
public interface Scan<ThisT,T extends ScanTask,G extends ScanTaskGroup<T>>  
Scan objects are immutable and can be shared between threads. Refinement methods, like 
select(Collection) and filter(Expression), create new TableScan instances.- 
Method SummaryModifier and TypeMethodDescriptioncaseSensitive(boolean caseSensitive) Create a new scan from this that, if data columns where selected viaselect(java.util.Collection), controls whether the match to the schema will be done with case sensitivity.filter()Returns this scan's filterExpression.filter(Expression expr) Create a new scan from the results of this filtered by theExpression.Create a new scan from this that applies data filtering to files but not to rows in those files.Create a new scan from this that loads the column stats with each data file.default ThisTincludeColumnStats(Collection<String> requestedColumns) Create a new scan from this that loads the column stats for the specific columns with each data file.booleanReturns whether this scan is case-sensitive with respect to column names.default ThisTmetricsReporter(MetricsReporter reporter) Create a new scan that will report scan metrics to the provided reporter in addition to reporters maintained by the scan.Create a new scan from this scan's configuration that will override theTable's behavior based on the incoming pair.Plan tasks for this scan where each task reads a single file.Plan balanced task groups for this scan by splitting large and combining small tasks.planWith(ExecutorService executorService) Create a new scan to use a particular executor to plan.Create a new scan from this with the schema as its projection.schema()Returns this scan's projectionSchema.default ThisTCreate a new scan from this that will read the given columns.select(Collection<String> columns) Create a new scan from this that will read the given data columns.intReturns the split lookback for this scan.longReturns the split open file cost for this scan.longReturns the target split size for this scan.
- 
Method Details- 
optionCreate a new scan from this scan's configuration that will override theTable's behavior based on the incoming pair. Unknown properties will be ignored.- 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
 
- 
projectCreate a new scan from this with the schema as its projection.- Parameters:
- schema- a projection schema
- Returns:
- a new scan based on this with the given projection
 
- 
caseSensitiveCreate a new scan from this that, if data columns where selected viaselect(java.util.Collection), controls whether the match to the schema will be done with case sensitivity. Default is true.- Returns:
- a new scan based on this with case sensitivity as stated
 
- 
isCaseSensitiveboolean isCaseSensitive()Returns whether this scan is case-sensitive with respect to column names.- Returns:
- true if case-sensitive, false otherwise.
 
- 
includeColumnStatsThisT includeColumnStats()Create 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. - Returns:
- a new scan based on this that loads column stats.
 
- 
includeColumnStatsCreate 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. - Parameters:
- requestedColumns- column names for which to keep the stats.
- Returns:
- a new scan based on this that loads column stats for specific columns.
 
- 
selectCreate 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.- Parameters:
- columns- column names from the table's schema
- Returns:
- a new scan based on this with the given projection columns
 
- 
selectCreate a new scan from this that will read the given columns. This produces an expected schema that includes all fields that are either selected or used by this scan's filter expression.- Parameters:
- columns- column names
- Returns:
- a new scan based on this with the given projection columns
 
- 
filterCreate a new scan from the results of this filtered by theExpression.- Parameters:
- expr- a filter expression
- Returns:
- a new scan based on this with results filtered by the expression
 
- 
filterExpression filter()Returns this scan's filterExpression.- Returns:
- this scan's filter expression
 
- 
ignoreResidualsThisT ignoreResiduals()Create a new scan from this that applies data filtering to files but not to rows in those files.- Returns:
- a new scan based on this that does not filter rows in files.
 
- 
planWithCreate a new scan to use a particular executor to plan. The default worker pool will be used by default.- Parameters:
- executorService- the provided executor
- Returns:
- a table scan that uses the provided executor to access manifests
 
- 
schemaSchema schema()Returns this scan's projectionSchema.If the projection schema was set directly using project(Schema), returns that schema.If the projection schema was set by calling select(Collection), returns a projection schema that includes the selected data fields and any fields used in the filter expression.- Returns:
- this scan's projection schema
 
- 
planFilesCloseableIterable<T> planFiles()Plan tasks for this scan where each task reads a single file.Use 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
 
- 
planTasksCloseableIterable<G> planTasks()Plan 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. - Returns:
- an Iterable of balanced task groups required by this scan
 
- 
targetSplitSizelong targetSplitSize()Returns the target split size for this scan.
- 
splitLookbackint splitLookback()Returns the split lookback for this scan.
- 
splitOpenFileCostlong splitOpenFileCost()Returns the split open file cost for this scan.
- 
metricsReporterCreate a new scan that will report scan metrics to the provided reporter in addition to reporters maintained by the scan.
 
-