Class BatchScanAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasOfTime(long timestampMillis) Create a newBatchScanfrom 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.caseSensitive(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.fileIO()Returns theFileIOinstance to use when reading data files for this scan.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.includeColumnStats(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.metricsReporter(MetricsReporter reporter) Create a new scan that will report scan metrics to the provided reporter in addition to reporters maintained by the scan.minRowsRequested(long numRows) Create a new scan that returns files with at least the given number of rows.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.select(Collection<String> columns) Create a new scan from this that will read the given data columns.snapshot()Returns theSnapshotthat will be used by this scan.intReturns the split lookback for this scan.longReturns the split open file cost for this scan.table()Returns theTablefrom which this scan loads data.longReturns the target split size for this scan.Create a newBatchScanfrom this scan's configuration that will use the given reference.useSnapshot(long snapshotId) Create a newBatchScanfrom this scan's configuration that will use a snapshot with the given ID.
-
Constructor Details
-
BatchScanAdapter
-
-
Method Details
-
table
Description copied from interface:BatchScanReturns theTablefrom which this scan loads data. -
fileIO
Description copied from interface:BatchScanReturns theFileIOinstance to use when reading data files for this scan. -
useSnapshot
Description copied from interface:BatchScanCreate a newBatchScanfrom this scan's configuration that will use a snapshot with the given ID.- Specified by:
useSnapshotin interfaceBatchScan- Parameters:
snapshotId- a snapshot ID- Returns:
- a new scan based on this with the given snapshot ID
-
useRef
Description copied from interface:BatchScanCreate a newBatchScanfrom this scan's configuration that will use the given reference. -
asOfTime
Description copied from interface:BatchScanCreate a newBatchScanfrom 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. -
snapshot
Description copied from interface:BatchScanReturns theSnapshotthat will be used by this scan.If the snapshot was not configured using
BatchScan.asOfTime(long)orBatchScan.useSnapshot(long), the current table snapshot will be used. -
option
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. -
project
Description copied from interface:ScanCreate a new scan from this with the schema as its projection. -
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 interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Returns:
- a new scan based on this with case sensitivity as stated
-
isCaseSensitive
public boolean isCaseSensitive()Description copied from interface:ScanReturns whether this scan is case-sensitive with respect to column names.- Specified by:
isCaseSensitivein interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Returns:
- true if case-sensitive, false otherwise.
-
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 interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Returns:
- a new scan based on this that loads column stats.
-
includeColumnStats
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 interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Parameters:
requestedColumns- column names for which to keep the stats.- Returns:
- a new scan based on this that loads column stats for specific columns.
-
select
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. -
filter
Description copied from interface:ScanCreate a new scan from the results of this filtered by theExpression. -
filter
Description copied from interface:ScanReturns this scan's filterExpression. -
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 interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Returns:
- a new scan based on this that does not filter rows in files.
-
planWith
Description copied from interface:ScanCreate a new scan to use a particular executor to plan. The default worker pool will be used by default. -
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. -
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. -
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.
-
targetSplitSize
public long targetSplitSize()Description copied from interface:ScanReturns the target split size for this scan.- Specified by:
targetSplitSizein interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>>
-
splitLookback
public int splitLookback()Description copied from interface:ScanReturns the split lookback for this scan.- Specified by:
splitLookbackin interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>>
-
splitOpenFileCost
public long splitOpenFileCost()Description copied from interface:ScanReturns the split open file cost for this scan.- Specified by:
splitOpenFileCostin interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>>
-
metricsReporter
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 interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>>
-
minRowsRequested
Description copied from interface:ScanCreate a new scan that returns files with at least the given number of rows. This is used as a hint and is entirely optional in order to not have to return more rows than necessary. This may return fewer rows if the scan does not contain that many, or it may return more than requested.- Specified by:
minRowsRequestedin interfaceScan<BatchScan,ScanTask, ScanTaskGroup<ScanTask>> - Parameters:
numRows- The minimum number of rows requested- Returns:
- A new scan based on this with at least the given number of rows
-