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.
|
java.util.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,
java.util.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, toString
protected final RelOptTable table
protected TableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table)
protected TableScan(RelInput input)
public double estimateRowCount(RelMetadataQuery mq)
RelNode
NOTE 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 RelNode
estimateRowCount
in class AbstractRelNode
mq
- Metadata querypublic RelOptTable getTable()
RelNode
getTable
in interface RelNode
getTable
in class AbstractRelNode
public java.util.List<RelCollation> getCollationList()
RelNode
getCollationList
in interface RelNode
getCollationList
in class AbstractRelNode
public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
RelNode
NOTE 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 RelNode
computeSelfCost
in class AbstractRelNode
planner
- Planner for cost calculationmq
- Metadata querypublic RelDataType deriveRowType()
deriveRowType
in class AbstractRelNode
public static ImmutableIntList identity(RelOptTable table)
public ImmutableIntList identity()
public RelWriter explainTerms(RelWriter pw)
AbstractRelNode
super.explainTerms
, then call the
RelWriter.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms
in class AbstractRelNode
pw
- Plan writerpublic RelNode project(ImmutableBitSet fieldsUsed, java.util.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)
RelNode
accept
in interface RelNode
accept
in class AbstractRelNode
shuttle
- ShuttleCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.