Enum Class SortKeyRole
- All Implemented Interfaces:
Serializable,Comparable<SortKeyRole>,Constable
The three GROUPING / SORTING key positions Snowflake names in its "cannot be used as ... keys"
rejection. A FILE-typed expression is legal almost everywhere — it compares, de-duplicates and
joins fine — but it may not be a key in any of these three positions, and the message names the
position: live,
GROUP BY f is "Expressions of type FILE cannot be used as
GROUP BY keys" (SQLSTATE 42804), ORDER BY f the ORDER BY variant, and
OVER (PARTITION BY f) the PARTITION BY variant.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA GROUP BY key, including a positional ordinal, a SELECT alias and a ROLLUP/CUBE element.An ORDER BY key, both the statement-level clause and the one inside an OVER spec.A window PARTITION BY key. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()The clause name exactly as Snowflake spells it in the rejection message.static SortKeyRoleReturns the enum constant of this class with the specified name.static SortKeyRole[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GROUP_BY
A GROUP BY key, including a positional ordinal, a SELECT alias and a ROLLUP/CUBE element. -
ORDER_BY
An ORDER BY key, both the statement-level clause and the one inside an OVER spec. -
PARTITION_BY
A window PARTITION BY key.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getLabel
The clause name exactly as Snowflake spells it in the rejection message.
-