java.lang.Object
java.lang.Enum<RankType>
org.apache.flink.table.runtime.operators.rank.RankType
All Implemented Interfaces:
Serializable, Comparable<RankType>

public enum RankType extends Enum<RankType>
An enumeration of rank type, usable to show how exactly generate rank number.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    is similar to the RANK by generating a unique rank number for each distinct row within the partition based on the order, starting at 1 for the first row in each partition, ranking the rows with equal values with the same rank number, except that it does not skip any rank, leaving no gaps between the ranks.
    Returns a unique rank number for each distinct row within the partition based on the order, starting at 1 for the first row in each partition, with the same rank for duplicate values and leaving gaps between the ranks; this gap appears in the sequence after the duplicate values.
    Returns a unique sequential number for each row within the partition based on the order, starting at 1 for the first row in each partition and without repeating or skipping numbers in the ranking result of each partition.
  • Method Summary

    Modifier and Type
    Method
    Description
    static RankType
    Returns the enum constant of this type with the specified name.
    static RankType[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ROW_NUMBER

      public static final RankType ROW_NUMBER
      Returns a unique sequential number for each row within the partition based on the order, starting at 1 for the first row in each partition and without repeating or skipping numbers in the ranking result of each partition. If there are duplicate values within the row set, the ranking numbers will be assigned arbitrarily.
    • RANK

      public static final RankType RANK
      Returns a unique rank number for each distinct row within the partition based on the order, starting at 1 for the first row in each partition, with the same rank for duplicate values and leaving gaps between the ranks; this gap appears in the sequence after the duplicate values.
    • DENSE_RANK

      public static final RankType DENSE_RANK
      is similar to the RANK by generating a unique rank number for each distinct row within the partition based on the order, starting at 1 for the first row in each partition, ranking the rows with equal values with the same rank number, except that it does not skip any rank, leaving no gaps between the ranks.
  • Method Details

    • values

      public static RankType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RankType valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null