public abstract class SingleRel extends AbstractRelNode
It is not required that single-input relational expressions use this class as a base class. However, default implementations of methods make life easier.
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
SingleRel(RelOptCluster cluster,
RelTraitSet traits,
RelNode input)
Creates a
SingleRel. |
| Modifier and Type | Method and Description |
|---|---|
void |
childrenAccept(RelVisitor visitor)
Interacts with the
RelVisitor in a
visitor pattern to
traverse the tree of relational expressions. |
protected RelDataType |
deriveRowType() |
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RelNode |
getInput() |
List<RelNode> |
getInputs()
Returns an array of this relational expression's inputs.
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will
return.
|
void |
replaceInput(int ordinalInParent,
RelNode rel)
Replaces the
ordinalInParentth input. |
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, copy, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringprotected SingleRel(RelOptCluster cluster, RelTraitSet traits, RelNode input)
SingleRel.cluster - Cluster this relational expression belongs toinput - Input relational expressionpublic RelNode getInput()
public List<RelNode> getInputs()
RelNodenull.getInputs in interface RelOptNodegetInputs in interface RelNodegetInputs in class AbstractRelNodepublic double getRows()
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.
getRows in interface RelNodegetRows in class AbstractRelNodepublic void childrenAccept(RelVisitor visitor)
RelNodeRelVisitor in a
visitor pattern to
traverse the tree of relational expressions.childrenAccept in interface RelNodechildrenAccept in class AbstractRelNodevisitor - Visitor that will traverse the tree of relational
expressionspublic 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 void replaceInput(int ordinalInParent,
RelNode rel)
RelNodeordinalInParentth input. You must
override this method if you override RelNode.getInputs().replaceInput in interface RelNodereplaceInput in class AbstractRelNodeordinalInParent - Position of the child input, 0 is the firstrel - New node that should be put at position ordinalInParentprotected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodeCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.