Package org.apache.calcite.rel.convert
Class ConverterImpl
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.SingleRel
org.apache.calcite.rel.convert.ConverterImpl
- All Implemented Interfaces:
Cloneable
,RelOptNode
,Converter
,RelNode
- Direct Known Subclasses:
AbstractConverter
,CassandraToEnumerableConverter
,ElasticsearchToEnumerableConverter
,EnumerableBindable
,EnumerableInterpretable
,EnumerableToSparkConverter
,GeodeToEnumerableConverter
,InnodbToEnumerableConverter
,InterpretableConverter
,JdbcToEnumerableConverter
,JdbcToSparkConverter
,MongoToEnumerableConverter
,NoneConverter
,PigToEnumerableConverter
,SparkToEnumerableConverter
Abstract implementation of
Converter
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
Field Summary
Modifier and TypeFieldDescriptionprotected final RelTraitSet
protected final @Nullable RelTraitDef
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ModifierConstructorDescriptionprotected
ConverterImpl
(RelOptCluster cluster, @Nullable RelTraitDef traitDef, RelTraitSet traits, RelNode child) Creates a ConverterImpl. -
Method Summary
Modifier and TypeMethodDescriptionprotected Error
Deprecated.@Nullable RelOptCost
computeSelfCost
(RelOptPlanner planner, RelMetadataQuery mq) Returns the cost of this plan (not including children).Returns the trait of the input relational expression.@Nullable RelTraitDef
Returns the definition of trait which this converter works on.Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, explainTerms, getInput, getInputs, replaceInput
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, copy, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.RelNode
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, copy, deepEquals, deepHashCode, estimateRowCount, explain, explain, fieldIsNullable, getConvention, getCorrelVariable, getDigest, getExpectedInputRowType, getInput, getInputs, getRelDigest, getRelTypeName, getRowType, getTable, getVariablesSet, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, stripped
Methods inherited from interface org.apache.calcite.plan.RelOptNode
getCluster, getDescription, getId, getTraitSet
-
Field Details
-
inTraits
-
traitDef
-
-
Constructor Details
-
ConverterImpl
protected ConverterImpl(RelOptCluster cluster, @Nullable RelTraitDef traitDef, RelTraitSet traits, RelNode child) Creates a ConverterImpl.- Parameters:
cluster
- planner's clustertraitDef
- the RelTraitDef this converter convertstraits
- the output traits of this converterchild
- child rel (provides input traits)
-
-
Method Details
-
computeSelfCost
Description copied from interface:RelNode
Returns the cost of this plan (not including children). The base implementation throws an error; derived classes should override.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.- Specified by:
computeSelfCost
in interfaceRelNode
- Overrides:
computeSelfCost
in classAbstractRelNode
- Parameters:
planner
- Planner for cost calculationmq
- Metadata query- Returns:
- Cost of this plan (not including children)
-
cannotImplement
Deprecated. -
getInputTraits
Description copied from interface:Converter
Returns the trait of the input relational expression.- Specified by:
getInputTraits
in interfaceConverter
- Returns:
- input trait
-
getTraitDef
Description copied from interface:Converter
Returns the definition of trait which this converter works on.The input relational expression (matched by the rule) must possess this trait and have the value given by
Converter.getInputTraits()
, and the traits of the output of this converter given byRelOptNode.getTraitSet()
will have one trait altered and the other orthogonal traits will be the same.- Specified by:
getTraitDef
in interfaceConverter
- Returns:
- trait which this converter modifies
-