public enum EnumerableConvention extends java.lang.Enum<EnumerableConvention> implements Convention
Enumerable
.Convention.Impl
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
static double |
COST_MULTIPLIER
Cost of an enumerable node versus implementing an equivalent node in a
"typical" calling convention.
|
NONE
Modifier and Type | Method and Description |
---|---|
boolean |
canConvertConvention(Convention toConvention)
Returns whether we should convert from this convention to
toConvention . |
java.lang.Class |
getInterface() |
java.lang.String |
getName() |
RelTraitDef |
getTraitDef()
Returns the RelTraitDef that defines this RelTrait.
|
void |
register(RelOptPlanner planner)
Registers a trait instance with the planner.
|
boolean |
satisfies(RelTrait trait)
Returns whether this trait satisfies a given trait.
|
java.lang.String |
toString()
Returns a succinct name for this trait.
|
boolean |
useAbstractConvertersForConversion(RelTraitSet fromTraits,
RelTraitSet toTraits)
Returns whether we should convert from this trait set to the other trait
set.
|
static EnumerableConvention |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EnumerableConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumerableConvention INSTANCE
public static final double COST_MULTIPLIER
public static EnumerableConvention[] values()
for (EnumerableConvention c : EnumerableConvention.values()) System.out.println(c);
public static EnumerableConvention valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
RelTrait
toString
in interface RelTrait
toString
in class java.lang.Enum<EnumerableConvention>
public java.lang.Class getInterface()
getInterface
in interface Convention
public java.lang.String getName()
getName
in interface Convention
public RelTraitDef getTraitDef()
RelTrait
getTraitDef
in interface RelTrait
public boolean satisfies(RelTrait trait)
RelTrait
A trait satisfies another if it is the same or stricter. For example,
ORDER BY x, y
satisfies ORDER BY x
.
A trait's satisfies
relation must be a partial order (reflexive,
anti-symmetric, transitive). Many traits cannot be "loosened"; their
satisfies
is an equivalence relation, where only X satisfies X.
If a trait has multiple values
(see RelCompositeTrait
)
a collection (T0, T1, ...) satisfies T if any Ti satisfies T.
public void register(RelOptPlanner planner)
RelTrait
This is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing.
public boolean canConvertConvention(Convention toConvention)
Convention
toConvention
. Used by ConventionTraitDef
.canConvertConvention
in interface Convention
toConvention
- Desired convention to convert topublic boolean useAbstractConvertersForConversion(RelTraitSet fromTraits, RelTraitSet toTraits)
Convention
The convention decides whether it wants to handle other trait conversions, e.g. collation, distribution, etc. For a given convention, we will only add abstract converters to handle the trait (convention, collation, distribution, etc.) conversions if this function returns true.
useAbstractConvertersForConversion
in interface Convention
fromTraits
- Traits of the RelNode that we are converting fromtoTraits
- Target traitsCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.