org.eigenbase.relopt.volcano
Class VolcanoPlannerTraitTest.AltTraitDef

java.lang.Object
  extended by org.eigenbase.relopt.RelTraitDef
      extended by org.eigenbase.relopt.volcano.VolcanoPlannerTraitTest.AltTraitDef
Enclosing class:
VolcanoPlannerTraitTest

private static class VolcanoPlannerTraitTest.AltTraitDef
extends RelTraitDef


Field Summary
private  MultiMap<RelTrait,Pair<RelTrait,ConverterRule>> conversionMap
           
 
Constructor Summary
private VolcanoPlannerTraitTest.AltTraitDef()
           
 
Method Summary
 boolean canConvert(RelOptPlanner planner, RelTrait fromTrait, RelTrait toTrait)
          Tests whether the given RelTrait can be converted to another RelTrait.
 RelNode convert(RelOptPlanner planner, RelNode rel, RelTrait toTrait, boolean allowInfiniteCostConverters)
          Converts the given RelNode to the given RelTrait.
 String getSimpleName()
           
 Class getTraitClass()
           
 void registerConverterRule(RelOptPlanner planner, ConverterRule converterRule)
          Provides notification of the registration of a particular ConverterRule with a RelOptPlanner.
 
Methods inherited from class org.eigenbase.relopt.RelTraitDef
canonize, deregisterConverterRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conversionMap

private MultiMap<RelTrait,Pair<RelTrait,ConverterRule>> conversionMap
Constructor Detail

VolcanoPlannerTraitTest.AltTraitDef

private VolcanoPlannerTraitTest.AltTraitDef()
Method Detail

getTraitClass

public Class getTraitClass()
Specified by:
getTraitClass in class RelTraitDef
Returns:
the specific RelTrait type associated with this RelTraitDef.

getSimpleName

public String getSimpleName()
Specified by:
getSimpleName in class RelTraitDef
Returns:
a simple name for this RelTraitDef (for use in RelNode.explain(RelOptPlanWriter)).

convert

public RelNode convert(RelOptPlanner planner,
                       RelNode rel,
                       RelTrait toTrait,
                       boolean allowInfiniteCostConverters)
Description copied from class: RelTraitDef
Converts the given RelNode to the given RelTrait.

Specified by:
convert in class RelTraitDef
Parameters:
planner - the planner requesting the conversion
rel - RelNode to convert
toTrait - RelTrait to convert to
allowInfiniteCostConverters - flag indicating whether infinite cost converters are allowe
Returns:
a converted RelNode or null if conversion is not possible

canConvert

public boolean canConvert(RelOptPlanner planner,
                          RelTrait fromTrait,
                          RelTrait toTrait)
Description copied from class: RelTraitDef
Tests whether the given RelTrait can be converted to another RelTrait.

Specified by:
canConvert in class RelTraitDef
Parameters:
planner - the planner requesting the conversion test
fromTrait - the RelTrait to convert from
toTrait - the RelTrait to conver to
Returns:
true if fromTrait can be converted to toTrait

registerConverterRule

public void registerConverterRule(RelOptPlanner planner,
                                  ConverterRule converterRule)
Description copied from class: RelTraitDef
Provides notification of the registration of a particular ConverterRule with a RelOptPlanner. The default implementation does nothing.

Overrides:
registerConverterRule in class RelTraitDef
Parameters:
planner - the planner registering the rule
converterRule - the registered converter rule