- All Implemented Interfaces:
Serializable,Comparable<RankingFunction>,Constable
The ranking window functions carried by a
WindowFunction.RankingWindow.
All ranking functions produce a NUMBER per row and operate over the
full sort order of the partition (a WindowFrame.PartitionFrame). The
permit set is established in slice 2 so the exhaustive-switch enforcement guides
slice 3; only WindowFunction.AggregateWindow is executable in slice 2.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRank without gaps after ties (e.g.Distributes rows intonbuckets as evenly as possible.Relative rank(rank − 1) / (rows − 1)in[0.0, 1.0].Rank with gaps after ties (e.g.Sequential 1-based position in the sort order (no ties). -
Method Summary
Modifier and TypeMethodDescriptionstatic RankingFunctionReturns the enum constant of this class with the specified name.static RankingFunction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROW_NUMBER
Sequential 1-based position in the sort order (no ties). -
RANK
Rank with gaps after ties (e.g.1, 1, 3). -
DENSE_RANK
Rank without gaps after ties (e.g.1, 1, 2). -
PERCENT_RANK
Relative rank(rank − 1) / (rows − 1)in[0.0, 1.0]. -
NTILE
Distributes rows intonbuckets as evenly as possible.
-
-
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
-