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:
java.lang.Cloneable
,RelOptNode
,Converter
,RelNode
- Direct Known Subclasses:
AbstractConverter
,CassandraToEnumerableConverter
,ElasticsearchToEnumerableConverter
,EnumerableBindable
,EnumerableInterpretable
,EnumerableToSparkConverter
,GeodeToEnumerableConverter
,InterpretableConverter
,JdbcToEnumerableConverter
,JdbcToSparkConverter
,MongoToEnumerableConverter
,NoneConverter
,PigToEnumerableConverter
,SparkToEnumerableConverter
public abstract class ConverterImpl extends SingleRel implements Converter
Abstract implementation ofConverter
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected RelTraitSet
inTraits
protected RelTraitDef
traitDef
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConverterImpl(RelOptCluster cluster, RelTraitDef traitDef, RelTraitSet traits, RelNode child)
Creates a ConverterImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.Error
cannotImplement()
Deprecated.RelOptCost
computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
Returns the cost of this plan (not including children).RelTraitSet
getInputTraits()
Returns the trait of the input relational expression.RelTraitDef
getTraitDef()
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, computeDigest, computeSelfCost, copy, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.rel.RelNode
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, copy, 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
-
Methods inherited from interface org.apache.calcite.plan.RelOptNode
getCluster, getDescription, getDigest, getId, getTraitSet
-
-
-
-
Field Detail
-
inTraits
protected RelTraitSet inTraits
-
traitDef
protected final RelTraitDef traitDef
-
-
Constructor Detail
-
ConverterImpl
protected ConverterImpl(RelOptCluster cluster, 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 Detail
-
computeSelfCost
public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
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 protected java.lang.Error cannotImplement()
Deprecated.
-
getInputTraits
public RelTraitSet getInputTraits()
Description copied from interface:Converter
Returns the trait of the input relational expression.- Specified by:
getInputTraits
in interfaceConverter
- Returns:
- input trait
-
getTraitDef
public RelTraitDef 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
-
-