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 LogicalFilter
FilterCalcMergeRule
merges this with a LogicalFilter
ProjectCalcMergeRule
merges this with a LogicalProject
CalcMergeRule
merges two LogicalCalc
s
RelNode.Context
digest, id, rowType, traitSet
Constructor and Description |
---|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a LogicalCalc.
|
LogicalCalc(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexProgram program,
java.util.List<RelCollation> collationList)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
collectVariablesUsed(java.util.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) |
accept, computeSelfCost, copy, copy, estimateRowCount, explainTerms, getProgram, isValid
childrenAccept, deriveRowType, getInput, getInputs, replaceInput
accept, collectVariablesSet, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
public LogicalCalc(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexProgram program)
@Deprecated public LogicalCalc(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexProgram program, java.util.List<RelCollation> collationList)
public static LogicalCalc create(RelNode input, RexProgram program)
public LogicalCalc copy(RelTraitSet traitSet, RelNode child, RexProgram program)
Calc
Calc
.copy
in class Calc
traitSet
- 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(java.util.Set<CorrelationId> variableSet)
RelNode
collectVariablesUsed
in interface RelNode
collectVariablesUsed
in class AbstractRelNode
variableSet
- receives variables usedCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.