Class HepRelVertex
- All Implemented Interfaces:
Cloneable,RelOptNode,DelegatingMetadataRel,RelNode
RelNode as a vertex in a DAG representing
the entire query expression.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context -
Field Summary
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Method Summary
Modifier and TypeMethodDescription@Nullable RelOptCostcomputeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) Returns the cost of this plan (not including children).copy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.booleandeepEquals(@Nullable Object obj) Equality check for RelNode digest.intCompute hash code for RelNode digest.protected RelDataTypedoubleReturns an estimate of the number of rows this relational expression will return.voidDescribes the inputs and attributes of this relational expression.Returns current implementation chosen for this vertex.Returns a digest string of thisRelNode.ReturnsRelNodefor metadata.stripped()Returns this node without any wrapper added by the planner.Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, equals, explainTerms, getCluster, getConvention, getCorrelVariable, getDescription, getExpectedInputRowType, getId, getInput, getInputs, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, 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
-
Method Details
-
explain
Description copied from interface:RelNodeDescribes the inputs and attributes of this relational expression. Each node should callsuper.explain, then call theRelWriter.input(String, RelNode)andRelWriter.item(String, Object)methods for each input and attribute.- Specified by:
explainin interfaceRelNode- Overrides:
explainin classAbstractRelNode- Parameters:
pw- Plan writer
-
copy
Description copied from interface:RelNodeCreates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
- Specified by:
copyin interfaceRelNode- Overrides:
copyin classAbstractRelNode- Parameters:
traitSet- Trait setinputs- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
computeSelfCost
Description copied from interface:RelNodeReturns the cost of this plan (not including children). The base implementation throws an error; derived classes should override.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.- Specified by:
computeSelfCostin interfaceRelNode- Overrides:
computeSelfCostin classAbstractRelNode- Parameters:
planner- Planner for cost calculationmq- Metadata query- Returns:
- Cost of this plan (not including children)
-
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
-
deriveRowType
- Overrides:
deriveRowTypein classAbstractRelNode
-
getCurrentRel
Returns current implementation chosen for this vertex. -
stripped
Description copied from interface:RelNodeReturns this node without any wrapper added by the planner. -
getMetadataDelegateRel
ReturnsRelNodefor metadata.- Specified by:
getMetadataDelegateRelin interfaceDelegatingMetadataRel
-
deepEquals
Description copied from class:AbstractRelNodeEquality check for RelNode digest.By default this method collects digest attributes from
AbstractRelNode.explainTerms(RelWriter), then compares each attribute pair. This should work well for most cases. If this method is a performance bottleneck for your project, or the default behavior can't handle your scenario properly, you can choose to override this method andAbstractRelNode.deepHashCode(). SeeLogicalJoinas an example.- Specified by:
deepEqualsin interfaceRelNode- Overrides:
deepEqualsin classAbstractRelNode- Returns:
- Whether the 2 RelNodes are equivalent or have the same digest.
- See Also:
-
deepHashCode
public int deepHashCode()Description copied from class:AbstractRelNodeCompute hash code for RelNode digest.- Specified by:
deepHashCodein interfaceRelNode- Overrides:
deepHashCodein classAbstractRelNode- See Also:
-
getDigest
Description copied from interface:RelNodeReturns a digest string of thisRelNode.Each call creates a new digest string, so don't forget to cache the result if necessary.
- Specified by:
getDigestin interfaceRelNode- Specified by:
getDigestin interfaceRelOptNode- Overrides:
getDigestin classAbstractRelNode- Returns:
- Digest string of this
RelNode - See Also:
-