Class 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

public abstract class ConverterImpl extends SingleRel implements Converter
Abstract implementation of Converter.
  • Field Details

  • Constructor Details

    • ConverterImpl

      protected ConverterImpl(RelOptCluster cluster, @Nullable RelTraitDef traitDef, RelTraitSet traits, RelNode child)
      Creates a ConverterImpl.
      cluster - planner's cluster
      traitDef - the RelTraitDef this converter converts
      traits - the output traits of this converter
      child - child rel (provides input traits)
  • Method Details

    • computeSelfCost

      public @Nullable 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 interface RelNode
      computeSelfCost in class AbstractRelNode
      planner - Planner for cost calculation
      mq - Metadata query
      Cost of this plan (not including children)
    • cannotImplement

      @Deprecated protected Error cannotImplement()
    • getInputTraits

      public RelTraitSet getInputTraits()
      Description copied from interface: Converter
      Returns the trait of the input relational expression.
      Specified by:
      getInputTraits in interface Converter
      input trait
    • getTraitDef

      public @Nullable 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 by RelOptNode.getTraitSet() will have one trait altered and the other orthogonal traits will be the same.

      Specified by:
      getTraitDef in interface Converter
      trait which this converter modifies