Package org.apache.calcite.rel
Class BiRel
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.BiRel
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public abstract class BiRel extends AbstractRelNode
Abstract base class for relational expressions with a two inputs.It is not required that two-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
-
-
Constructor Summary
Constructors Constructor Description BiRel(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
childrenAccept(RelVisitor visitor)
Interacts with theRelVisitor
in avisitor pattern
to traverse the tree of relational expressions.RelWriter
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.java.util.List<RelNode>
getInputs()
Returns an array of this relational expression's inputs.RelNode
getLeft()
RelNode
getRight()
void
replaceInput(int ordinalInParent, RelNode p)
Replaces theordinalInParent
th input.-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, computeSelfCost, copy, deriveRowType, estimateRowCount, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Constructor Detail
-
BiRel
public BiRel(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right)
-
-
Method Detail
-
childrenAccept
public void childrenAccept(RelVisitor visitor)
Description copied from interface:RelNode
Interacts with theRelVisitor
in avisitor pattern
to traverse the tree of relational expressions.- Specified by:
childrenAccept
in interfaceRelNode
- Overrides:
childrenAccept
in classAbstractRelNode
- Parameters:
visitor
- Visitor that will traverse the tree of relational expressions
-
getInputs
public java.util.List<RelNode> getInputs()
Description copied from interface:RelNode
Returns an array of this relational expression's inputs. If there are no inputs, returns an empty list, notnull
.- Specified by:
getInputs
in interfaceRelNode
- Specified by:
getInputs
in interfaceRelOptNode
- Overrides:
getInputs
in classAbstractRelNode
- Returns:
- Array of this relational expression's inputs
-
getLeft
public RelNode getLeft()
-
getRight
public RelNode getRight()
-
replaceInput
public void replaceInput(int ordinalInParent, RelNode p)
Description copied from interface:RelNode
Replaces theordinalInParent
th input. You must override this method if you overrideRelNode.getInputs()
.- Specified by:
replaceInput
in interfaceRelNode
- Overrides:
replaceInput
in classAbstractRelNode
- Parameters:
ordinalInParent
- Position of the child input, 0 is the firstp
- New node that should be put at positionordinalInParent
-
explainTerms
public RelWriter explainTerms(RelWriter pw)
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriterImpl.input(String, RelNode)
andRelWriterImpl.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classAbstractRelNode
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-
-