public class RelSubset extends AbstractRelNode
Physical properties are instances of the RelTraitSet, and consist
of traits such as calling convention and collation (sort-order).
For some traits, a relational expression can have more than one instance. For example, R can be sorted on both [X] and [Y, Z]. In which case, R would belong to the sub-sets for [X] and [Y, Z]; and also the leading edges [Y] and [].
digest, id, rowType, traitSet| Modifier and Type | Method and Description |
|---|---|
void |
collectVariablesSet(Set<String> variableSet)
Collects variables set by this expression.
|
void |
collectVariablesUsed(Set<String> variableSet)
Collects variables known to be used by this expression or its
descendants.
|
protected String |
computeDigest()
Computes the digest.
|
RelOptCost |
computeSelfCost(RelOptPlanner planner)
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.
|
protected RelDataType |
deriveRowType() |
void |
explain(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RelNode |
getBest() |
Collection<RelNode> |
getParentRels()
Returns a list of relational expressions one of whose children is this
subset.
|
List<RelNode> |
getRelList()
As
getRels() but returns a list. |
Iterable<RelNode> |
getRels()
Returns the rel nodes in this rel subset.
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will
return.
|
Set<String> |
getVariablesSet() |
Set<String> |
getVariablesUsed() |
boolean |
isDistinct()
Returns whether the same value will not come out twice.
|
boolean |
isKey(ImmutableBitSet columns)
Returns whether the result of this relational expression is uniquely
identified by this columns with the given ordinals.
|
void |
propagateBoostRemoval(VolcanoPlanner planner) |
accept, accept, childrenAccept, explainTerms, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toStringpublic RelNode getBest()
public 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 RelOptCost computeSelfCost(RelOptPlanner planner)
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 calculationpublic double getRows()
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.
getRows in interface RelNodegetRows in class AbstractRelNodepublic void explain(RelWriter pw)
RelNodesuper.explain, then call the
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explain in interface RelNodeexplain in class AbstractRelNodepw - Plan writerprotected String computeDigest()
AbstractRelNodecomputeDigest in class AbstractRelNodeprotected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic boolean isDistinct()
RelNodefalse, derived classes should override.isDistinct in interface RelNodeisDistinct in class AbstractRelNodepublic boolean isKey(ImmutableBitSet columns)
RelNodeFor example, if this relational expression is a LogicalTableScan to T(A, B, C, D) whose key is (A, B), then isKey([0, 1]) yields true, and isKey([0]) and isKey([0, 2]) yields false.
isKey in interface RelNodeisKey in class AbstractRelNodecolumns - Ordinals of key columnspublic Collection<RelNode> getParentRels()
public void propagateBoostRemoval(VolcanoPlanner planner)
public void collectVariablesUsed(Set<String> variableSet)
RelNodecollectVariablesUsed in interface RelNodecollectVariablesUsed in class AbstractRelNodevariableSet - receives variables usedpublic void collectVariablesSet(Set<String> variableSet)
RelNodecollectVariablesSet in interface RelNodecollectVariablesSet in class AbstractRelNodevariableSet - receives variables known to be set bypublic Iterable<RelNode> getRels()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.