Enum Class OffsetFunction

java.lang.Object
java.lang.Enum<OffsetFunction>
com.darkcollective.relix.ast.OffsetFunction
All Implemented Interfaces:
Serializable, Comparable<OffsetFunction>, Constable

public enum OffsetFunction extends Enum<OffsetFunction>
The offset window functions carried by a WindowFunction.OffsetWindow.

Each reads a value from another row in the partition's sort order; the output type is the type of the offset expression. The permit set is established in slice 2 so the exhaustive-switch enforcement guides slice 4; only WindowFunction.AggregateWindow is executable in slice 2.

  • Enum Constant Details

    • LAG

      public static final OffsetFunction LAG
      The expression's value n rows before the current row.
    • LEAD

      public static final OffsetFunction LEAD
      The expression's value n rows after the current row.
    • FIRST_VALUE

      public static final OffsetFunction FIRST_VALUE
      The expression's value in the first row of the partition's sort order.
    • LAST_VALUE

      public static final OffsetFunction LAST_VALUE
      The expression's value in the last row of the partition's sort order.
  • Method Details

    • values

      public static OffsetFunction[] 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

      public static OffsetFunction valueOf(String name)
      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 name
      NullPointerException - if the argument is null