public abstract class TableScan extends AbstractRelNode
RelNode.Context| Modifier and Type | Field and Description |
|---|---|
protected RelOptTable |
table
The table definition.
|
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
TableScan(RelInput input)
Creates a TableScan by parsing serialized output.
|
protected |
TableScan(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.
|
RelOptCost |
computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq)
Returns the cost of this plan (not including children).
|
RelDataType |
deriveRowType() |
double |
estimateRowCount(RelMetadataQuery mq)
Returns an estimate of the number of rows this relational expression will
return.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
List<RelCollation> |
getCollationList()
Returns a description of the physical ordering (or orderings) of this
relational expression.
|
RelOptTable |
getTable()
If this relational expression represents an access to a table, returns
that table, otherwise returns null.
|
ImmutableIntList |
identity()
Returns an identity projection.
|
static ImmutableIntList |
identity(RelOptTable table)
Returns an identity projection for the given table.
|
RelNode |
project(ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields,
RelBuilder relBuilder)
Projects a subset of the fields of the table, and also asks for "extra"
fields that were not included in the table's official type.
|
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, copy, explain, getChildExps, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toStringprotected final RelOptTable table
protected TableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table)
protected TableScan(RelInput input)
public double estimateRowCount(RelMetadataQuery mq)
RelNodeNOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getRowCount(org.apache.calcite.rel.RelNode), which gives plugins a chance to
override the rel's default ideas about row count.
estimateRowCount in interface RelNodeestimateRowCount in class AbstractRelNodemq - Metadata querypublic RelOptTable getTable()
RelNodegetTable in interface RelNodegetTable in class AbstractRelNodepublic List<RelCollation> getCollationList()
RelNodegetCollationList in interface RelNodegetCollationList in class AbstractRelNodepublic RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
RelNodeNOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getNonCumulativeCost(org.apache.calcite.rel.RelNode), which gives plugins a
chance to override the rel's default ideas about cost.
computeSelfCost in interface RelNodecomputeSelfCost in class AbstractRelNodeplanner - Planner for cost calculationmq - Metadata querypublic RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic static ImmutableIntList identity(RelOptTable table)
public ImmutableIntList identity()
public RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerpublic RelNode project(ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields, RelBuilder relBuilder)
The default implementation assumes that tables cannot do either of
these operations, therefore it adds a Project that projects
NULL values for the extra fields, using the
RelBuilder.project(Iterable) method.
Sub-classes, representing table types that have these capabilities, should override.
fieldsUsed - Bitmap of the fields desired by the consumerextraFields - Extra fields, not advertised in the table's row-type,
wanted by the consumerrelBuilder - Builder used to create a Projectpublic RelNode accept(RelShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - ShuttleCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.