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
Modifier and TypeClassDescriptionstatic enum
Direction that a field is ordered in.static enum
Ordering of nulls. -
Field Summary
Modifier and TypeFieldDescriptionDirection of sorting.Direction of sorting of nulls. -
Constructor Summary
ConstructorDescriptionRelFieldCollation
(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 int
compare
(@Nullable Comparable c1, @Nullable Comparable c2, int nullComparison) Utility method that compares values taking into account null direction.copy
(int target) Deprecated.boolean
int
int
hashCode()
shift
(int offset) Returns a copy of this RelFieldCollation with the field index shiftedoffset
to 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 shiftedoffset
to the right. -
equals
-
hashCode
public int hashCode() -
getFieldIndex
public int getFieldIndex() -
getDirection
-
toString
-
shortString
-