|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelTraitDef
public abstract class RelTraitDef
RelTraitDef represents a class of RelTrait
s. Implementations of
RelTraitDef may be singletons under the following conditions:
canConvert(RelOptPlanner, RelTrait, RelTrait)
and convert(RelOptPlanner, RelNode, RelTrait, boolean)
do not require
planner-instance-specific information, orCallingConventionTraitDef
for an example of this.Otherwise, a new instance of RelTraitDef must be constructed and registered with each new planner instantiated.
Field Summary | |
---|---|
private WeakHashMap<RelTrait,WeakReference<RelTrait>> |
canonicalMap
|
Constructor Summary | |
---|---|
RelTraitDef()
|
Method Summary | |
---|---|
abstract boolean |
canConvert(RelOptPlanner planner,
RelTrait fromTrait,
RelTrait toTrait)
Tests whether the given RelTrait can be converted to another RelTrait. |
RelTrait |
canonize(RelTrait trait)
Takes an arbitrary RelTrait and returns the canonical representation of that RelTrait. |
abstract 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 . |
abstract String |
getSimpleName()
|
abstract Class |
getTraitClass()
|
void |
registerConverterRule(RelOptPlanner planner,
ConverterRule converterRule)
Provides notification of the registration of a particular ConverterRule with a RelOptPlanner . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final WeakHashMap<RelTrait,WeakReference<RelTrait>> canonicalMap
Constructor Detail |
---|
public RelTraitDef()
Method Detail |
---|
public abstract Class getTraitClass()
public abstract String getSimpleName()
RelNode.explain(RelOptPlanWriter)
).public final RelTrait canonize(RelTrait trait)
==
).
If an equal RelTrait has already been canonized and is still in use, it will be returned. Otherwise, the given RelTrait is made canonical and returned.
trait
- a possibly non-canonical RelTrait
public abstract RelNode convert(RelOptPlanner planner, RelNode rel, RelTrait toTrait, boolean allowInfiniteCostConverters)
planner
- the planner requesting the conversionrel
- RelNode to converttoTrait
- RelTrait to convert toallowInfiniteCostConverters
- flag indicating whether infinite cost
converters are allowe
public abstract boolean canConvert(RelOptPlanner planner, RelTrait fromTrait, RelTrait toTrait)
planner
- the planner requesting the conversion testfromTrait
- the RelTrait to convert fromtoTrait
- the RelTrait to conver to
public void registerConverterRule(RelOptPlanner planner, ConverterRule converterRule)
ConverterRule
with a RelOptPlanner
. The default implementation
does nothing.
planner
- the planner registering the ruleconverterRule
- the registered converter rulepublic void deregisterConverterRule(RelOptPlanner planner, ConverterRule converterRule)
ConverterRule
has been
deregistered from a RelOptPlanner
. The default implementation
does nothing.
planner
- the planner registering the ruleconverterRule
- the registered converter rule
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |