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
FieldsModifier and TypeFieldDescriptionprotected final RelTraitSetprotected final @Nullable RelTraitDefFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConverterImpl(RelOptCluster cluster, @Nullable RelTraitDef traitDef, RelTraitSet traits, RelNode child) Creates a ConverterImpl. -
Method Summary
Modifier and TypeMethodDescriptionprotected ErrorDeprecated.@Nullable RelOptCostcomputeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) Returns the cost of this plan (not including children).Returns the trait of the input relational expression.@Nullable RelTraitDefReturns the definition of trait which this converter works on.Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, explainTerms, getInput, getInputs, replaceInputMethods 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, strippedMethods 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:RelNodeReturns 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:
computeSelfCostin interfaceRelNode- Overrides:
computeSelfCostin classAbstractRelNode- Parameters:
planner- Planner for cost calculationmq- Metadata query- Returns:
- Cost of this plan (not including children)
-
cannotImplement
Deprecated. -
getInputTraits
Description copied from interface:ConverterReturns the trait of the input relational expression.- Specified by:
getInputTraitsin interfaceConverter- Returns:
- input trait
-
getTraitDef
Description copied from interface:ConverterReturns 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:
getTraitDefin interfaceConverter- Returns:
- trait which this converter modifies
-