private static class RelDistributions.RelDistributionImpl extends Object implements RelDistribution
RelDistribution.RelDistribution.Type| Modifier and Type | Field and Description |
|---|---|
private ImmutableIntList |
keys |
private static com.google.common.collect.Ordering<Iterable<Integer>> |
ORDERING |
private RelDistribution.Type |
type |
| Modifier | Constructor and Description |
|---|---|
private |
RelDistributionImpl(RelDistribution.Type type,
ImmutableIntList keys) |
| Modifier and Type | Method and Description |
|---|---|
RelDistribution |
apply(Mappings.TargetMapping mapping) |
int |
compareTo(RelMultipleTrait o) |
boolean |
equals(Object obj)
|
List<Integer> |
getKeys()
Returns the ordinals of the key columns.
|
RelDistributionTraitDef |
getTraitDef()
Returns the RelTraitDef that defines this RelTrait.
|
RelDistribution.Type |
getType()
Returns the type of distribution.
|
int |
hashCode()
|
boolean |
isTop()
Returns whether this trait is satisfied by every instance of the trait
(including itself).
|
void |
register(RelOptPlanner planner)
Registers a trait instance with the planner.
|
boolean |
satisfies(RelTrait trait)
Returns whether this trait satisfies a given trait.
|
String |
toString()
Returns a succinct name for this trait.
|
private final RelDistribution.Type type
private final ImmutableIntList keys
private RelDistributionImpl(RelDistribution.Type type, ImmutableIntList keys)
public int hashCode()
RelTraitpublic String toString()
RelTrait@Nonnull public RelDistribution.Type getType()
RelDistributiongetType in interface RelDistribution@Nonnull public List<Integer> getKeys()
RelDistributionOrder is important for some types (RANGE); other types (HASH) consider it unimportant but impose an arbitrary order; other types (BROADCAST, SINGLETON) never have keys.
getKeys in interface RelDistributionpublic RelDistributionTraitDef getTraitDef()
RelTraitgetTraitDef in interface RelTraitpublic RelDistribution apply(Mappings.TargetMapping mapping)
apply in interface RelDistributionpublic boolean satisfies(RelTrait trait)
RelTraitA 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)
RelTraitThis is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing.
public boolean isTop()
RelMultipleTraitisTop in interface RelMultipleTraitpublic int compareTo(@Nonnull RelMultipleTrait o)
compareTo in interface Comparable<RelMultipleTrait>Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.