public class RelCollationImpl extends Object implements RelCollation
RelCollation.| Modifier and Type | Field and Description |
|---|---|
static RelCollation |
EMPTY
Deprecated.
|
static RelCollation |
PRESERVE
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
RelCollationImpl(com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(RelMultipleTrait o) |
static List<RelCollation> |
createSingleton(int fieldIndex)
Deprecated.
|
static boolean |
equal(List<RelCollation> collationList1,
List<RelCollation> collationList2)
Deprecated.
|
boolean |
equals(Object obj)
|
List<RelFieldCollation> |
getFieldCollations()
Returns the ordinals and directions of the columns in this ordering.
|
RelTraitDef |
getTraitDef()
Returns the RelTraitDef that defines this RelTrait.
|
int |
hashCode()
|
boolean |
isTop()
Returns whether this trait is satisfied by every instance of the trait
(including itself).
|
static boolean |
isValid(RelDataType rowType,
List<RelCollation> collationList,
boolean fail)
Deprecated.
|
static RelCollation |
of(List<RelFieldCollation> fieldCollations)
Deprecated.
|
static RelCollation |
of(RelFieldCollation... fieldCollations)
Deprecated.
|
static List<Integer> |
ordinals(RelCollation collation)
Deprecated.
|
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 string representation of this collation, suitably terse given
that it will appear in plan traces.
|
@Deprecated public static final RelCollation EMPTY
@Deprecated public static final RelCollation PRESERVE
protected RelCollationImpl(com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations)
@Deprecated public static RelCollation of(RelFieldCollation... fieldCollations)
@Deprecated public static RelCollation of(List<RelFieldCollation> fieldCollations)
public RelTraitDef getTraitDef()
RelTraitgetTraitDef in interface RelTraitpublic List<RelFieldCollation> getFieldCollations()
RelCollationgetFieldCollations in interface RelCollationpublic int hashCode()
RelTraitpublic boolean isTop()
RelMultipleTraitisTop in interface RelMultipleTraitpublic int compareTo(@Nonnull RelMultipleTrait o)
compareTo in interface Comparable<RelMultipleTrait>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 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 String toString()
@Deprecated public static List<RelCollation> createSingleton(int fieldIndex)
@Deprecated public static boolean isValid(RelDataType rowType, List<RelCollation> collationList, boolean fail)
@Deprecated public static boolean equal(List<RelCollation> collationList1, List<RelCollation> collationList2)
@Deprecated public static List<Integer> ordinals(RelCollation collation)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.