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 | Constructor and Description |
---|---|
private |
RelDistributionTraitDef() |
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.
|
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.
|
java.lang.String |
getSimpleName() |
java.lang.Class<RelDistribution> |
getTraitClass() |
canConvert, canonize, deregisterConverterRule, multiple, registerConverterRule
public static final RelDistributionTraitDef INSTANCE
public java.lang.Class<RelDistribution> getTraitClass()
getTraitClass
in class RelTraitDef<RelDistribution>
public java.lang.String getSimpleName()
getSimpleName
in class RelTraitDef<RelDistribution>
RelNode.explain(org.apache.calcite.rel.RelWriter)
).public RelDistribution getDefault()
RelTraitDef
getDefault
in class RelTraitDef<RelDistribution>
public RelNode convert(RelOptPlanner planner, RelNode rel, RelDistribution toDistribution, boolean allowInfiniteCostConverters)
RelTraitDef
convert
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)
RelTraitDef
canConvert
in class RelTraitDef<RelDistribution>
planner
- the planner requesting the conversion testfromTrait
- the RelTrait to convert fromtoTrait
- the RelTrait to convert toCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.