public class AbstractConverter extends ConverterImpl
Unlike most Converter
s, an abstract
converter is always abstract. You would typically create an
AbstractConverter
when it is necessary to transform a relational
expression immediately; later, rules will transform it into relational
expressions which can be implemented.
If an abstract converter cannot be satisfied immediately (because the source subset is abstract), the set is flagged, so this converter will be expanded as soon as a non-abstract relexp is added to the set.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractConverter.ExpandConversionRule
Rule which converts an
AbstractConverter into a chain of
converters from the source relation to the target traits. |
RelNode.Context
inTraits, traitDef
digest, id, rowType, traitSet
Constructor and Description |
---|
AbstractConverter(RelOptCluster cluster,
RelSubset rel,
RelTraitDef traitDef,
RelTraitSet traits) |
Modifier and Type | Method and Description |
---|---|
RelOptCost |
computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq)
Returns the cost of this plan (not including children).
|
RelNode |
copy(RelTraitSet traitSet,
java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
cannotImplement, getInputTraits, getTraitDef
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, estimateRowCount, explain, getChildExps, getCollationList, getConvention, getCorrelVariable, getExpectedInputRowType, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTable, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, replaceInput
getCluster, getDescription, getDigest, getId, getTraitSet
public AbstractConverter(RelOptCluster cluster, RelSubset rel, RelTraitDef traitDef, RelTraitSet traits)
public RelNode copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
RelNode
Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy
in interface RelNode
copy
in class AbstractRelNode
traitSet
- Trait setinputs
- Inputspublic RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
RelNode
NOTE 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 RelNode
computeSelfCost
in class ConverterImpl
planner
- Planner for cost calculationmq
- Metadata querypublic RelWriter explainTerms(RelWriter pw)
AbstractRelNode
super.explainTerms
, then call the
RelWriter.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms
in class SingleRel
pw
- Plan writerCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.