|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelTraitDef org.eigenbase.relopt.CallingConventionTraitDef
public class CallingConventionTraitDef
CallingConventionTraitDef is a RelTraitDef
that defines the
calling-convention trait. A new set of conversion information is created for
each planner that registers at least one ConverterRule
instance.
Conversion data is held in a WeakHashMap
so that the JVM's garbage
collector may reclaim the conversion data after the planner itself has been
garbage collected. The conversion information consists of a graph of
conversions (from one calling convention to another) and a map of graph arcs
to ConverterRule
s.
Nested Class Summary | |
---|---|
private static class |
CallingConventionTraitDef.ConversionData
|
Field Summary | |
---|---|
static CallingConventionTraitDef |
instance
|
private WeakHashMap<RelOptPlanner,CallingConventionTraitDef.ConversionData> |
plannerConversionMap
Weak-key map of RelOptPlanner to ConversionData. |
Constructor Summary | |
---|---|
private |
CallingConventionTraitDef()
|
Method Summary | |
---|---|
boolean |
canConvert(RelOptPlanner planner,
RelTrait fromTrait,
RelTrait toTrait)
Tests whether the given RelTrait can be converted to another RelTrait. |
private RelNode |
changeConvention(RelNode rel,
Graph.Arc arc,
MultiMap<Graph.Arc,ConverterRule> mapArcToConverterRule)
Tries to convert a relational expression to the target convention of an arc. |
RelNode |
convert(RelOptPlanner planner,
RelNode rel,
RelTrait toTrait,
boolean allowInfiniteCostConverters)
Converts the given RelNode to the given RelTrait. |
void |
deregisterConverterRule(RelOptPlanner planner,
ConverterRule converterRule)
Provides notification that a particular ConverterRule has been
deregistered from a RelOptPlanner . |
private CallingConventionTraitDef.ConversionData |
getConversionData(RelOptPlanner planner)
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CallingConventionTraitDef instance
private final WeakHashMap<RelOptPlanner,CallingConventionTraitDef.ConversionData> plannerConversionMap
Constructor Detail |
---|
private CallingConventionTraitDef()
Method Detail |
---|
public Class getTraitClass()
getTraitClass
in class RelTraitDef
public String getSimpleName()
getSimpleName
in class RelTraitDef
RelNode.explain(RelOptPlanWriter)
).public void registerConverterRule(RelOptPlanner planner, ConverterRule converterRule)
RelTraitDef
ConverterRule
with a RelOptPlanner
. The default implementation
does nothing.
registerConverterRule
in class RelTraitDef
planner
- the planner registering the ruleconverterRule
- the registered converter rulepublic void deregisterConverterRule(RelOptPlanner planner, ConverterRule converterRule)
RelTraitDef
ConverterRule
has been
deregistered from a RelOptPlanner
. The default implementation
does nothing.
deregisterConverterRule
in class RelTraitDef
planner
- the planner registering the ruleconverterRule
- the registered converter rulepublic RelNode convert(RelOptPlanner planner, RelNode rel, RelTrait toTrait, boolean allowInfiniteCostConverters)
RelTraitDef
convert
in class RelTraitDef
planner
- the planner requesting the conversionrel
- RelNode to converttoTrait
- RelTrait to convert toallowInfiniteCostConverters
- flag indicating whether infinite cost
converters are allowe
private RelNode changeConvention(RelNode rel, Graph.Arc arc, MultiMap<Graph.Arc,ConverterRule> mapArcToConverterRule)
public boolean canConvert(RelOptPlanner planner, RelTrait fromTrait, RelTrait toTrait)
RelTraitDef
canConvert
in class RelTraitDef
planner
- the planner requesting the conversion testfromTrait
- the RelTrait to convert fromtoTrait
- the RelTrait to conver to
private CallingConventionTraitDef.ConversionData getConversionData(RelOptPlanner planner)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |