Package org.apache.calcite.rel
Class RelCollationImpl
java.lang.Object
org.apache.calcite.rel.RelCollationImpl
- All Implemented Interfaces:
- Comparable<RelMultipleTrait>,- RelMultipleTrait,- RelTrait,- RelCollation
Simple implementation of 
RelCollation.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final RelCollationDeprecated.static final RelCollationDeprecated.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRelCollationImpl(com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations) 
- 
Method SummaryModifier and TypeMethodDescriptionapply(Mappings.TargetMapping mapping) Applies mapping to a given collation.intstatic List<RelCollation>createSingleton(int fieldIndex) Deprecated.static booleanequal(List<RelCollation> collationList1, List<RelCollation> collationList2) Deprecated.booleanReturns the ordinals and directions of the columns in this ordering.Returns the RelTraitDef that defines this RelTrait.inthashCode()booleanisTop()Returns whether this trait is satisfied by every instance of the trait (including itself).static booleanisValid(RelDataType rowType, List<RelCollation> collationList, boolean fail) Deprecated.static RelCollationof(List<RelFieldCollation> fieldCollations) Deprecated.static RelCollationof(RelFieldCollation... fieldCollations) Deprecated.ordinals(RelCollation collation) Deprecated.voidregister(RelOptPlanner planner) Registers a trait instance with the planner.booleanReturns whether this trait satisfies a given trait.toString()Returns a string representation of this collation, suitably terse given that it will appear in plan traces.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.RelCollationgetKeys
- 
Field Details- 
EMPTYDeprecated.
- 
PRESERVEDeprecated.
 
- 
- 
Constructor Details- 
RelCollationImplprotected RelCollationImpl(com.google.common.collect.ImmutableList<RelFieldCollation> fieldCollations) 
 
- 
- 
Method Details- 
ofDeprecated.
- 
ofDeprecated.
- 
getTraitDefDescription copied from interface:RelTraitReturns the RelTraitDef that defines this RelTrait.- Specified by:
- getTraitDefin interface- RelTrait
- Returns:
- the RelTraitDef that defines this RelTrait
 
- 
getFieldCollationsDescription copied from interface:RelCollationReturns the ordinals and directions of the columns in this ordering.- Specified by:
- getFieldCollationsin interface- RelCollation
 
- 
hashCodepublic int hashCode()Description copied from interface:RelTrait
- 
equalsDescription copied from interface:RelTrait
- 
isToppublic boolean isTop()Description copied from interface:RelMultipleTraitReturns whether this trait is satisfied by every instance of the trait (including itself).- Specified by:
- isTopin interface- RelMultipleTrait
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<RelMultipleTrait>
 
- 
registerDescription copied from interface:RelTraitRegisters a trait instance with the planner.This is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing. 
- 
applyApplies mapping to a given collation.If mapping destroys the collation prefix, this method returns an empty collation. Examples of applying mappings to collation [0, 1]: - mapping(0, 1) => [0, 1]
- mapping(1, 0) => [1, 0]
- mapping(0) => [0]
- mapping(1) => []
- mapping(2, 0) => [1]
- mapping(2, 1, 0) => [2, 1]
- mapping(2, 1) => []
 
- 
satisfiesDescription copied from interface:RelTraitReturns whether this trait satisfies a given trait.A trait satisfies another if it is the same or stricter. For example, ORDER BY x, ysatisfiesORDER BY x.A trait's satisfiesrelation must be a partial order (reflexive, anti-symmetric, transitive). Many traits cannot be "loosened"; theirsatisfiesis 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.
- 
toStringReturns a string representation of this collation, suitably terse given that it will appear in plan traces. Examples: "[]", "[2]", "[0 DESC, 1]", "[0 DESC, 1 ASC NULLS LAST]".
- 
createSingletonDeprecated.
- 
isValid@Deprecated public static boolean isValid(RelDataType rowType, List<RelCollation> collationList, boolean fail) Deprecated.
- 
equal@Deprecated public static boolean equal(List<RelCollation> collationList1, List<RelCollation> collationList2) Deprecated.
- 
ordinalsDeprecated.
 
-