Enum NullPolicy

java.lang.Object
java.lang.Enum<NullPolicy>
org.apache.calcite.adapter.enumerable.NullPolicy
All Implemented Interfaces:
Serializable, Comparable<NullPolicy>, Constable

public enum NullPolicy extends Enum<NullPolicy>
Describes when a function/operator will return null.

STRICT and ANY are similar. STRICT says f(a0, a1) will NEVER return null if a0 and a1 are not null. This means that we can check whether f returns null just by checking its arguments. Use STRICT in preference to ANY whenever possible.

  • Enum Constant Details

    • ALL

      public static final NullPolicy ALL
      Returns null if and only if all of the arguments are null; If all of the arguments are false return false otherwise true.
    • STRICT

      public static final NullPolicy STRICT
      Returns null if and only if one of the arguments are null.
    • SEMI_STRICT

      public static final NullPolicy SEMI_STRICT
      Returns null if one of the arguments is null, and possibly other times.
    • ANY

      public static final NullPolicy ANY
      If any of the arguments are null, return null.
    • ARG0

      public static final NullPolicy ARG0
      If the first argument is null, return null.
    • NONE

      public static final NullPolicy NONE
  • Method Details

    • values

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