public abstract class Calc extends SingleRel
Calc is an abstract base class for implementations of
LogicalCalc.| Modifier and Type | Field and Description |
|---|---|
protected RexProgram |
program |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
Calc(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program)
Creates a Calc.
|
protected |
Calc(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RexShuttle shuttle)
Accepts a visit from a shuttle.
|
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children).
|
Calc |
copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
abstract Calc |
copy(RelTraitSet traitSet,
RelNode child,
RexProgram program)
Creates a copy of this
Calc. |
Calc |
copy(RelTraitSet traitSet,
RelNode child,
RexProgram program,
List<RelCollation> collationList)
Deprecated.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RexProgram |
getProgram() |
double |
getRows()
Returns an estimate of the number of rows this relational expression will
return.
|
boolean |
isValid(boolean fail)
Returns whether this relational expression is valid.
|
childrenAccept, deriveRowType, getInput, getInputs, replaceInputaccept, collectVariablesSet, collectVariablesUsed, computeDigest, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, metadata, onRegister, recomputeDigest, register, sole, toStringprotected final RexProgram program
protected Calc(RelOptCluster cluster, RelTraitSet traits, RelNode child, RexProgram program)
cluster - Clustertraits - Traitschild - Input relationprogram - Calc program@Deprecated protected Calc(RelOptCluster cluster, RelTraitSet traits, RelNode child, RexProgram program, List<RelCollation> collationList)
public final Calc 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 abstract Calc copy(RelTraitSet traitSet, RelNode child, RexProgram program)
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 samecopy(org.apache.calcite.plan.RelTraitSet, java.util.List)@Deprecated public Calc copy(RelTraitSet traitSet, RelNode child, RexProgram program, List<RelCollation> collationList)
public boolean isValid(boolean fail)
RelNodeIf assertions are enabled, this method is typically called with
fail = true, as follows:
This signals that the method can throw anassert rel.isValid(true)
AssertionError if it is
not valid.isValid in interface RelNodeisValid in class AbstractRelNodefail - Whether to fail if invalidpublic RexProgram getProgram()
public 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.
public 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 RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class SingleRelpw - Plan writerpublic RelNode accept(RexShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - ShuttleCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.