public interface Convention extends RelTrait
| Modifier and Type | Interface and Description |
|---|---|
static class |
Convention.Impl
Default implementation.
|
| Modifier and Type | Field and Description |
|---|---|
static Convention |
NONE
Convention that for a relational expression that does not support any
convention.
|
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canConvertConvention(Convention toConvention)
Returns whether we should convert from this convention to
toConvention. |
default @Nullable RelNode |
enforce(RelNode input,
RelTraitSet required)
Given an input and required traits, returns the corresponding
enforcer rel nodes, like physical Sort, Exchange etc.
|
Class |
getInterface() |
String |
getName() |
default RelFactories.Struct |
getRelFactories()
Return RelFactories struct for this convention.
|
default boolean |
useAbstractConvertersForConversion(RelTraitSet fromTraits,
RelTraitSet toTraits)
Returns whether we should convert from this trait set to the other trait
set.
|
static final Convention NONE
Relational expressions generally start off in this form.
Such expressions always have infinite cost.
Class getInterface()
String getName()
default @Nullable RelNode enforce(RelNode input, RelTraitSet required)
input - The input RelNoderequired - The required traitsnull if trait enforcement is not allowed or the
required traitSet can't be satisfied.default boolean canConvertConvention(Convention toConvention)
toConvention. Used by ConventionTraitDef.toConvention - Desired convention to convert todefault boolean useAbstractConvertersForConversion(RelTraitSet fromTraits, RelTraitSet toTraits)
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.
fromTraits - Traits of the RelNode that we are converting fromtoTraits - Target traitsdefault RelFactories.Struct getRelFactories()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.