public class HepRelVertex extends AbstractRelNode implements DelegatingMetadataRel
RelNode as a vertex in a DAG representing
the entire query expression.RelNode.Contextdigest, id, rowType, traitSet| Modifier and Type | Method and Description |
|---|---|
@Nullable RelOptCost |
computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq)
Returns the cost of this plan (not including children).
|
RelNode |
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 |
deepHashCode()
Compute hash code for RelNode digest.
|
protected RelDataType |
deriveRowType() |
double |
estimateRowCount(RelMetadataQuery mq)
Returns an estimate of the number of rows this relational expression will
return.
|
void |
explain(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RelNode |
getCurrentRel()
Returns current implementation chosen for this vertex.
|
String |
getDigest()
Returns a digest string of this
RelNode. |
RelNode |
getMetadataDelegateRel()
Returns
RelNode for metadata. |
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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitexplain, fieldIsNullablepublic void explain(RelWriter pw)
RelNodesuper.explain, then call the
RelWriter.input(String, RelNode)
and
RelWriter.item(String, Object)
methods for each input and attribute.explain in interface RelNodeexplain in class AbstractRelNodepw - Plan writerpublic RelNode copy(RelTraitSet traitSet, List<RelNode> inputs)
RelNodeSub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy in interface RelNodecopy in class AbstractRelNodetraitSet - Trait setinputs - Inputspublic @Nullable RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
RelNodeNOTE 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.
computeSelfCost in interface RelNodecomputeSelfCost in class AbstractRelNodeplanner - Planner for cost calculationmq - Metadata querypublic double estimateRowCount(RelMetadataQuery mq)
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.
estimateRowCount in interface RelNodeestimateRowCount in class AbstractRelNodemq - Metadata queryprotected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic RelNode getCurrentRel()
public RelNode getMetadataDelegateRel()
RelNode for metadata.getMetadataDelegateRel in interface DelegatingMetadataRelpublic boolean deepEquals(@Nullable Object obj)
AbstractRelNodeBy 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 and
AbstractRelNode.deepHashCode(). See LogicalJoin as an example.
deepEquals in interface RelNodedeepEquals in class AbstractRelNodeAbstractRelNode.deepHashCode()public int deepHashCode()
AbstractRelNodedeepHashCode in interface RelNodedeepHashCode in class AbstractRelNodeRelNode.deepEquals(Object)public String getDigest()
RelNodeRelNode.
Each call creates a new digest string, so don't forget to cache the result if necessary.
getDigest in interface RelOptNodegetDigest in interface RelNodegetDigest in class AbstractRelNodeRelNodeRelNode.getRelDigest()Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.