Package org.apache.calcite.rel
Class RelFieldCollation
java.lang.Object
org.apache.calcite.rel.RelFieldCollation
Definition of the ordering of one field of a
RelNode whose
output is to be sorted.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDirection that a field is ordered in.static enumOrdering of nulls. -
Field Summary
FieldsModifier and TypeFieldDescriptionDirection of sorting.Direction of sorting of nulls. -
Constructor Summary
ConstructorsConstructorDescriptionRelFieldCollation(int fieldIndex) Creates an ascending field collation.RelFieldCollation(int fieldIndex, RelFieldCollation.Direction direction) Creates a field collation with unspecified null direction.RelFieldCollation(int fieldIndex, RelFieldCollation.Direction direction, RelFieldCollation.NullDirection nullDirection) Creates a field collation. -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompare(@Nullable Comparable c1, @Nullable Comparable c2, int nullComparison) Utility method that compares values taking into account null direction.copy(int target) Deprecated.booleanintinthashCode()shift(int offset) Returns a copy of this RelFieldCollation with the field index shiftedoffsetto the right.toString()withDirection(RelFieldCollation.Direction direction) Creates a copy of this RelFieldCollation with a different direction.withFieldIndex(int fieldIndex) Creates a copy of this RelFieldCollation against a different field.withNullDirection(RelFieldCollation.NullDirection nullDirection) Creates a copy of this RelFieldCollation with a different null direction.
-
Field Details
-
direction
Direction of sorting. -
nullDirection
Direction of sorting of nulls.
-
-
Constructor Details
-
RelFieldCollation
public RelFieldCollation(int fieldIndex) Creates an ascending field collation. -
RelFieldCollation
Creates a field collation with unspecified null direction. -
RelFieldCollation
public RelFieldCollation(int fieldIndex, RelFieldCollation.Direction direction, RelFieldCollation.NullDirection nullDirection) Creates a field collation.
-
-
Method Details
-
compare
Utility method that compares values taking into account null direction. -
withFieldIndex
Creates a copy of this RelFieldCollation against a different field. -
copy
Deprecated. -
withDirection
Creates a copy of this RelFieldCollation with a different direction. -
withNullDirection
Creates a copy of this RelFieldCollation with a different null direction. -
shift
Returns a copy of this RelFieldCollation with the field index shiftedoffsetto the right. -
equals
-
hashCode
public int hashCode() -
getFieldIndex
public int getFieldIndex() -
getDirection
-
toString
-
shortString
-
fullString
-