public static class DataFilesTable.FilesTableScan
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
TableScan |
asOfTime(long timestampMillis)
Create a new
TableScan from this scan's configuration that will use the most recent
snapshot as of the given time in milliseconds. |
TableScan |
caseSensitive(boolean scanCaseSensitive)
Create a new
TableScan from this that, if data columns where selected
via TableScan.select(java.util.Collection) , controls whether the match to the schema will be done
with case sensitivity. |
Expression |
filter()
Returns this scan's filter
Expression . |
TableScan |
filter(Expression expr)
Create a new
TableScan from the results of this filtered by the Expression . |
TableScan |
includeColumnStats()
Create a new
TableScan from this that loads the column stats with each data file. |
boolean |
isCaseSensitive()
Returns whether this scan should apply column name case sensitiveness as per
TableScan.caseSensitive(boolean) . |
protected TableScan |
newRefinedScan(TableOperations ops,
Table table,
java.lang.Long snapshotId,
Schema schema,
Expression rowFilter,
boolean caseSensitive,
boolean colStats,
java.util.Collection<java.lang.String> selectedColumns,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> options) |
TableScan |
option(java.lang.String property,
java.lang.String value)
|
CloseableIterable<FileScanTask> |
planFiles()
Plan the
files that will be read by this scan. |
protected CloseableIterable<FileScanTask> |
planFiles(TableOperations ops,
Snapshot snapshot,
Expression rowFilter,
boolean caseSensitive,
boolean colStats) |
CloseableIterable<CombinedScanTask> |
planTasks()
Plan the
tasks for this scan. |
TableScan |
project(Schema projectedSchema)
Create a new
TableScan from this with the schema as its projection. |
Schema |
schema()
Returns this scan's projection
Schema . |
TableScan |
select(java.util.Collection<java.lang.String> columns)
Create a new
TableScan from this that will read the given data columns. |
Snapshot |
snapshot()
Returns the
Snapshot that will be used by this scan. |
Table |
table()
Returns the
Table from which this scan loads data. |
protected long |
targetSplitSize(TableOperations ops) |
java.lang.String |
toString() |
TableScan |
useSnapshot(long scanSnapshotId)
Create a new
TableScan from this scan's configuration that will use the given snapshot
by ID. |
protected TableScan newRefinedScan(TableOperations ops, Table table, java.lang.Long snapshotId, Schema schema, Expression rowFilter, boolean caseSensitive, boolean colStats, java.util.Collection<java.lang.String> selectedColumns, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> options)
protected long targetSplitSize(TableOperations ops)
protected CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean caseSensitive, boolean colStats)
public Table table()
TableScan
Table
from which this scan loads data.public TableScan useSnapshot(long scanSnapshotId)
TableScan
TableScan
from this scan's configuration that will use the given snapshot
by ID.useSnapshot
in interface TableScan
scanSnapshotId
- a snapshot IDpublic TableScan asOfTime(long timestampMillis)
TableScan
TableScan
from this scan's configuration that will use the most recent
snapshot as of the given time in milliseconds.public TableScan option(java.lang.String property, java.lang.String value)
TableScan
public TableScan project(Schema projectedSchema)
TableScan
TableScan
from this with the schema as its projection.public TableScan caseSensitive(boolean scanCaseSensitive)
TableScan
TableScan
from this that, if data columns where selected
via TableScan.select(java.util.Collection)
, controls whether the match to the schema will be done
with case sensitivity.caseSensitive
in interface TableScan
public TableScan includeColumnStats()
TableScan
TableScan
from this that loads the column stats with each data file.
Column stats include: value count, null value count, lower bounds, and upper bounds.
includeColumnStats
in interface TableScan
public TableScan select(java.util.Collection<java.lang.String> columns)
TableScan
TableScan
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.public TableScan filter(Expression expr)
TableScan
TableScan
from the results of this filtered by the Expression
.public Expression filter()
TableScan
Expression
.public CloseableIterable<FileScanTask> planFiles()
TableScan
files
that 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.
public CloseableIterable<CombinedScanTask> planTasks()
TableScan
tasks
for this scan.
Tasks created by this method may read partial input files, multiple input files, or both.
public Schema schema()
TableScan
Schema
.
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.
public Snapshot snapshot()
TableScan
Snapshot
that will be used by this scan.
If the snapshot was not configured using TableScan.asOfTime(long)
or TableScan.useSnapshot(long)
, the current table
snapshot will be used.
public boolean isCaseSensitive()
TableScan
TableScan.caseSensitive(boolean)
.isCaseSensitive
in interface TableScan
public java.lang.String toString()
toString
in class java.lang.Object