public class ConventionTraitDef extends RelTraitDef<Convention>
ConverterRule instance.
Conversion data is held in a LoadingCache
with weak keys 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.
|
@Nullable 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()
Returns a simple name for this RelTraitDef (for use in
RelNode.explain(org.apache.calcite.rel.RelWriter)). |
Class<Convention> |
getTraitClass()
Returns the specific RelTrait type associated with this RelTraitDef.
|
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()
RelTraitDefgetTraitClass in class RelTraitDef<Convention>public String getSimpleName()
RelTraitDefRelNode.explain(org.apache.calcite.rel.RelWriter)).getSimpleName in class RelTraitDef<Convention>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 @Nullable 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-2022 Apache Software Foundation. All Rights Reserved.