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 RelOptCost
computeSelfCost
(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.boolean
deepEquals
(@Nullable Object obj) Equality check for RelNode digest.int
Compute hash code for RelNode digest.protected RelDataType
double
Returns an estimate of the number of rows this relational expression will return.void
Describes the inputs and attributes of this relational expression.Returns current implementation chosen for this vertex.Returns a digest string of thisRelNode
.ReturnsRelNode
for 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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable
-
Method Details
-
explain
Description copied from interface:RelNode
Describes 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:
explain
in interfaceRelNode
- Overrides:
explain
in classAbstractRelNode
- Parameters:
pw
- Plan writer
-
copy
Description copied from interface:RelNode
Creates 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:
copy
in interfaceRelNode
- Overrides:
copy
in classAbstractRelNode
- Parameters:
traitSet
- Trait setinputs
- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
computeSelfCost
Description copied from interface:RelNode
Returns 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:
computeSelfCost
in interfaceRelNode
- Overrides:
computeSelfCost
in classAbstractRelNode
- Parameters:
planner
- Planner for cost calculationmq
- Metadata query- Returns:
- Cost of this plan (not including children)
-
estimateRowCount
Description copied from interface:RelNode
Returns 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:
estimateRowCount
in interfaceRelNode
- Overrides:
estimateRowCount
in classAbstractRelNode
- Parameters:
mq
- Metadata query- Returns:
- Estimate of the number of rows this relational expression will return
-
deriveRowType
- Overrides:
deriveRowType
in classAbstractRelNode
-
getCurrentRel
Returns current implementation chosen for this vertex. -
stripped
Description copied from interface:RelNode
Returns this node without any wrapper added by the planner. -
getMetadataDelegateRel
ReturnsRelNode
for metadata.- Specified by:
getMetadataDelegateRel
in interfaceDelegatingMetadataRel
-
deepEquals
Description copied from class:AbstractRelNode
Equality 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()
. SeeLogicalJoin
as an example.- Specified by:
deepEquals
in interfaceRelNode
- Overrides:
deepEquals
in classAbstractRelNode
- Returns:
- Whether the 2 RelNodes are equivalent or have the same digest.
- See Also:
-
deepHashCode
public int deepHashCode()Description copied from class:AbstractRelNode
Compute hash code for RelNode digest.- Specified by:
deepHashCode
in interfaceRelNode
- Overrides:
deepHashCode
in classAbstractRelNode
- See Also:
-
getDigest
Description copied from interface:RelNode
Returns a digest string of thisRelNode
.Each call creates a new digest string, so don't forget to cache the result if necessary.
- Specified by:
getDigest
in interfaceRelNode
- Specified by:
getDigest
in interfaceRelOptNode
- Overrides:
getDigest
in classAbstractRelNode
- Returns:
- Digest string of this
RelNode
- See Also:
-