Enum Class NullPlacement

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

public enum NullPlacement extends Enum<NullPlacement>
Controls where NULL values appear when a column is used as a sort key.

SQL specifies two placements: NULLS_FIRST places all NULL values before any non-NULL value; NULLS_LAST places them after. The SQL standard defaults are NULLS_LAST for SortDirection.ASC and NULLS_FIRST for SortDirection.DESC. These defaults apply when no explicit placement is specified — see SortSpecification.nullPlacement().

Used by the merge-join comparator to ensure both merge inputs are compared with the same NULL ordering, and by the sort executor to honour explicit NULLS FIRST/NULLS LAST clauses (Phase C4+).

  • Enum Constant Details

    • NULLS_FIRST

      public static final NullPlacement NULLS_FIRST
      NULL values sort before all non-NULL values.
    • NULLS_LAST

      public static final NullPlacement NULLS_LAST
      NULL values sort after all non-NULL values.
  • Method Details

    • values

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