public final class LogicalCalc extends Calc
This relational expression combines the functionality of
LogicalProject and LogicalFilter.
It should be created in the later
stages of optimization, by merging consecutive LogicalProject and
LogicalFilter nodes together.
The following rules relate to LogicalCalc:
FilterToCalcRule creates this from a LogicalFilter
ProjectToCalcRule creates this from a LogicalProject
FilterCalcMergeRule
merges this with a LogicalFilter
ProjectCalcMergeRule
merges this with a LogicalProject
CalcMergeRule
merges two LogicalCalcs
RelNode.Contextdigest, id, rowType, traitSet| Constructor and Description |
|---|
LogicalCalc(RelInput input)
Creates a LogicalCalc by parsing serialized output.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelHint> hints,
RelNode child,
RexProgram program)
Creates a LogicalCalc.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program)
Deprecated.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.
|
void |
collectVariablesUsed(Set<CorrelationId> variableSet)
Collects variables known to be used by this expression or its
descendants.
|
LogicalCalc |
copy(RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a copy of this
Calc. |
static LogicalCalc |
create(RelNode input,
RexProgram program) |
RelNode |
withHints(List<RelHint> hintList)
Returns a new relational expression with the specified hints
hintList. |
accept, computeSelfCost, containsOver, copy, copy, estimateRowCount, explainTerms, getHints, getProgram, isValidchildrenAccept, deriveRowType, getInput, getInputs, replaceInputcollectVariablesSet, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattachHintsexplain, fieldIsNullablepublic LogicalCalc(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode child, RexProgram program)
@Deprecated public LogicalCalc(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexProgram program)
public LogicalCalc(RelInput input)
@Deprecated public LogicalCalc(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexProgram program, List<RelCollation> collationList)
public static LogicalCalc create(RelNode input, RexProgram program)
public LogicalCalc copy(RelTraitSet traitSet, RelNode child, RexProgram program)
CalcCalc.copy in class CalctraitSet - Traitschild - Input relationprogram - Calc programCalc if any parameter differs from the value of this
Calc, or just this if all the parameters are the sameCalc.copy(org.apache.calcite.plan.RelTraitSet, java.util.List)public void collectVariablesUsed(Set<CorrelationId> variableSet)
RelNodecollectVariablesUsed in interface RelNodecollectVariablesUsed in class AbstractRelNodevariableSet - receives variables usedpublic RelNode withHints(List<RelHint> hintList)
HintablehintList.
This method should be overridden by every logical node that supports hint. It is only for internal use during decorrelation.
Sub-class should return a new copy of the relational expression.
The default implementation returns the relational expression directly only because not every kind of relational expression supports hints.
public RelNode accept(RelShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - ShuttleCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.