public class RelDistributionTraitDef extends RelTraitDef<RelDistribution>
Distribution is a physical property (i.e. a trait) because it can be
changed without loss of information. The converter to do this is the
Exchange operator.
| Modifier and Type | Field and Description |
|---|---|
static RelDistributionTraitDef |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(RelOptPlanner planner,
RelDistribution fromTrait,
RelDistribution toTrait)
Tests whether the given RelTrait can be converted to another RelTrait.
|
@Nullable RelNode |
convert(RelOptPlanner planner,
RelNode rel,
RelDistribution toDistribution,
boolean allowInfiniteCostConverters)
Converts the given RelNode to the given RelTrait.
|
RelDistribution |
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<RelDistribution> |
getTraitClass()
Returns the specific RelTrait type associated with this RelTraitDef.
|
canonize, deregisterConverterRule, multiple, registerConverterRulepublic static final RelDistributionTraitDef INSTANCE
public Class<RelDistribution> getTraitClass()
RelTraitDefgetTraitClass in class RelTraitDef<RelDistribution>public String getSimpleName()
RelTraitDefRelNode.explain(org.apache.calcite.rel.RelWriter)).getSimpleName in class RelTraitDef<RelDistribution>public RelDistribution getDefault()
RelTraitDefgetDefault in class RelTraitDef<RelDistribution>public @Nullable RelNode convert(RelOptPlanner planner, RelNode rel, RelDistribution toDistribution, boolean allowInfiniteCostConverters)
RelTraitDefconvert in class RelTraitDef<RelDistribution>planner - the planner requesting the conversionrel - RelNode to converttoDistribution - RelTrait to convert toallowInfiniteCostConverters - flag indicating whether infinite cost
converters are allowedpublic boolean canConvert(RelOptPlanner planner, RelDistribution fromTrait, RelDistribution toTrait)
RelTraitDefcanConvert in class RelTraitDef<RelDistribution>planner - the planner requesting the conversion testfromTrait - the RelTrait to convert fromtoTrait - the RelTrait to convert toCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.