public class ConventionTraitDef extends RelTraitDef<Convention>
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 ConverterRules.
| Modifier and Type | Field and Description |
|---|---|
static ConventionTraitDef |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(RelOptPlanner planner,
Convention fromConvention,
Convention toConvention)
Tests whether the given RelTrait can be converted to another RelTrait.
|
RelNode |
convert(RelOptPlanner planner,
RelNode rel,
Convention toConvention,
boolean allowInfiniteCostConverters)
Converts the given RelNode to the given RelTrait.
|
void |
deregisterConverterRule(RelOptPlanner planner,
ConverterRule converterRule)
Provides notification that a particular
ConverterRule has been
de-registered from a RelOptPlanner. |
Convention |
getDefault()
Returns the default member of this trait.
|
String |
getSimpleName() |
Class<Convention> |
getTraitClass() |
void |
registerConverterRule(RelOptPlanner planner,
ConverterRule converterRule)
Provides notification of the registration of a particular
ConverterRule with a RelOptPlanner. |
canonize, multiplepublic static final ConventionTraitDef INSTANCE
public Class<Convention> getTraitClass()
getTraitClass in class RelTraitDef<Convention>public String getSimpleName()
getSimpleName in class RelTraitDef<Convention>RelNode.explain(org.apache.calcite.rel.RelWriter)).public Convention getDefault()
RelTraitDefgetDefault in class RelTraitDef<Convention>public void registerConverterRule(RelOptPlanner planner, ConverterRule converterRule)
RelTraitDefConverterRule with a RelOptPlanner. The default
implementation does nothing.registerConverterRule in class RelTraitDef<Convention>planner - the planner registering the ruleconverterRule - the registered converter rulepublic void deregisterConverterRule(RelOptPlanner planner, ConverterRule converterRule)
RelTraitDefConverterRule has been
de-registered from a RelOptPlanner. The default implementation
does nothing.deregisterConverterRule in class RelTraitDef<Convention>planner - the planner registering the ruleconverterRule - the registered converter rulepublic RelNode convert(RelOptPlanner planner, RelNode rel, Convention toConvention, boolean allowInfiniteCostConverters)
RelTraitDefconvert in class RelTraitDef<Convention>planner - the planner requesting the conversionrel - RelNode to converttoConvention - RelTrait to convert toallowInfiniteCostConverters - flag indicating whether infinite cost
converters are allowedpublic boolean canConvert(RelOptPlanner planner, Convention fromConvention, Convention toConvention)
RelTraitDefcanConvert in class RelTraitDef<Convention>planner - the planner requesting the conversion testfromConvention - the RelTrait to convert fromtoConvention - the RelTrait to convert toCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.