Package org.apache.calcite.rel
Class SingleRel
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.SingleRel
- All Implemented Interfaces:
 Cloneable,RelOptNode,RelNode
- Direct Known Subclasses:
 Aggregate,Calc,CassandraLimit,Chi,Collect,ConverterImpl,Delta,EnumerableInterpreter,EnumerableLimit,Exchange,Filter,JdbcRules.JdbcCalc,Match,Project,Sample,Snapshot,Sort,SparkRules.SparkCalc,Spool,TableModify,Uncollect,Window
Abstract base class for relational expressions with a single input.
 
It is not required that single-input relational expressions use this class as a base class. However, default implementations of methods make life easier.
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context - 
Field Summary
FieldsFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleRel(RelOptCluster cluster, RelTraitSet traits, RelNode input) Creates aSingleRel. - 
Method Summary
Modifier and TypeMethodDescriptionvoidchildrenAccept(RelVisitor visitor) Interacts with theRelVisitorin avisitor patternto traverse the tree of relational expressions.protected RelDataTypedoubleReturns an estimate of the number of rows this relational expression will return.Describes the inputs and attributes of this relational expression.getInput()Returns an array of this relational expression's inputs.voidreplaceInput(int ordinalInParent, RelNode rel) Replaces theordinalInParentth input.Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeSelfCost, copy, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped 
- 
Field Details
- 
input
 
 - 
 - 
Constructor Details
- 
SingleRel
Creates aSingleRel.- Parameters:
 cluster- Cluster this relational expression belongs toinput- Input relational expression
 
 - 
 - 
Method Details
- 
getInput
 - 
getInputs
Description copied from interface:RelNodeReturns an array of this relational expression's inputs. If there are no inputs, returns an empty list, notnull.- Specified by:
 getInputsin interfaceRelNode- Specified by:
 getInputsin interfaceRelOptNode- Overrides:
 getInputsin classAbstractRelNode- Returns:
 - Array of this relational expression's inputs
 
 - 
estimateRowCount
Description copied from interface:RelNodeReturns an estimate of the number of rows this relational expression will return.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.- Specified by:
 estimateRowCountin interfaceRelNode- Overrides:
 estimateRowCountin classAbstractRelNode- Parameters:
 mq- Metadata query- Returns:
 - Estimate of the number of rows this relational expression will return
 
 - 
childrenAccept
Description copied from interface:RelNodeInteracts with theRelVisitorin avisitor patternto traverse the tree of relational expressions.- Specified by:
 childrenAcceptin interfaceRelNode- Overrides:
 childrenAcceptin classAbstractRelNode- Parameters:
 visitor- Visitor that will traverse the tree of relational expressions
 - 
explainTerms
Description copied from class:AbstractRelNodeDescribes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms, then call theRelWriter.input(String, RelNode)andRelWriter.item(String, Object)methods for each input and attribute.- Overrides:
 explainTermsin classAbstractRelNode- Parameters:
 pw- Plan writer- Returns:
 - Plan writer for fluent-explain pattern
 
 - 
replaceInput
Description copied from interface:RelNodeReplaces theordinalInParentth input. You must override this method if you overrideRelNode.getInputs().- Specified by:
 replaceInputin interfaceRelNode- Overrides:
 replaceInputin classAbstractRelNode- Parameters:
 ordinalInParent- Position of the child input, 0 is the firstrel- New node that should be put at positionordinalInParent
 - 
deriveRowType
- Overrides:
 deriveRowTypein classAbstractRelNode
 
 -