Package org.apache.calcite.rel
Enum RelFieldCollation.Direction
- java.lang.Object
-
- java.lang.Enum<RelFieldCollation.Direction>
-
- org.apache.calcite.rel.RelFieldCollation.Direction
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RelFieldCollation.Direction>
- Enclosing class:
- RelFieldCollation
public static enum RelFieldCollation.Direction extends java.lang.Enum<RelFieldCollation.Direction>
Direction that a field is ordered in.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASCENDING
Ascending direction: A value is always followed by a greater or equal value.CLUSTERED
Clustered direction: Values occur in no particular order, and the same value may occur in contiguous groups, but never occurs after that.DESCENDING
Descending direction: A value is always followed by a lesser or equal value.STRICTLY_ASCENDING
Strictly ascending direction: A value is always followed by a greater value.STRICTLY_DESCENDING
Strictly descending direction: A value is always followed by a lesser value.
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
shortString
-
Constructor Summary
Constructors Modifier Constructor Description private
Direction(java.lang.String shortString)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelFieldCollation.NullDirection
defaultNullDirection()
Returns the null direction if not specified.boolean
isDescending()
Returns whether this isDESCENDING
orSTRICTLY_DESCENDING
.SqlMonotonicity
monotonicity()
Converts the direction to aSqlMonotonicity
.static RelFieldCollation.Direction
of(SqlMonotonicity monotonicity)
Converts aSqlMonotonicity
to a direction.static RelFieldCollation.Direction
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RelFieldCollation.Direction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ASCENDING
public static final RelFieldCollation.Direction ASCENDING
Ascending direction: A value is always followed by a greater or equal value.
-
STRICTLY_ASCENDING
public static final RelFieldCollation.Direction STRICTLY_ASCENDING
Strictly ascending direction: A value is always followed by a greater value.
-
DESCENDING
public static final RelFieldCollation.Direction DESCENDING
Descending direction: A value is always followed by a lesser or equal value.
-
STRICTLY_DESCENDING
public static final RelFieldCollation.Direction STRICTLY_DESCENDING
Strictly descending direction: A value is always followed by a lesser value.
-
CLUSTERED
public static final RelFieldCollation.Direction CLUSTERED
Clustered direction: Values occur in no particular order, and the same value may occur in contiguous groups, but never occurs after that. This sort order tends to occur when values are ordered according to a hash-key.
-
-
Method Detail
-
values
public static RelFieldCollation.Direction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RelFieldCollation.Direction c : RelFieldCollation.Direction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RelFieldCollation.Direction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
monotonicity
public SqlMonotonicity monotonicity()
Converts the direction to aSqlMonotonicity
.
-
of
public static RelFieldCollation.Direction of(SqlMonotonicity monotonicity)
Converts aSqlMonotonicity
to a direction.
-
defaultNullDirection
public RelFieldCollation.NullDirection defaultNullDirection()
Returns the null direction if not specified. Consistent with Oracle, NULLS are sorted as if they were positive infinity.
-
isDescending
public boolean isDescending()
Returns whether this isDESCENDING
orSTRICTLY_DESCENDING
.
-
-