Enum RexImpTable.NullAs

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RexImpTable.NullAs>
    Enclosing class:
    RexImpTable

    public static enum RexImpTable.NullAs
    extends java.lang.Enum<RexImpTable.NullAs>
    Strategy what an operator should return if one of its arguments is null.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      FALSE
      If one of the arguments is null, the function returns false.
      IS_NOT_NULL
      Return true if result is not null, false if result is null.
      IS_NULL
      Return false if result is not null, true if result is null.
      NOT_POSSIBLE
      It is not possible for any of the arguments to be null.
      NULL
      The most common policy among the SQL built-in operators.
      TRUE
      If one of the arguments is null, the function returns true.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NullAs()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Expression handle​(Expression x)
      Adapts an expression with "normal" result to one that adheres to this particular policy.
      static RexImpTable.NullAs of​(boolean nullable)  
      static RexImpTable.NullAs valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RexImpTable.NullAs[] values()
      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 Detail

      • NULL

        public static final RexImpTable.NullAs NULL
        The most common policy among the SQL built-in operators. If one of the arguments is null, returns null.
      • FALSE

        public static final RexImpTable.NullAs FALSE
        If one of the arguments is null, the function returns false. Example: IS NOT NULL.
      • TRUE

        public static final RexImpTable.NullAs TRUE
        If one of the arguments is null, the function returns true. Example: IS NULL.
      • NOT_POSSIBLE

        public static final RexImpTable.NullAs NOT_POSSIBLE
        It is not possible for any of the arguments to be null. If the argument type is nullable, the enclosing code will already have performed a not-null check. This may allow the operator implementor to generate a more efficient implementation, for example, by avoiding boxing or unboxing.
      • IS_NULL

        public static final RexImpTable.NullAs IS_NULL
        Return false if result is not null, true if result is null.
      • IS_NOT_NULL

        public static final RexImpTable.NullAs IS_NOT_NULL
        Return true if result is not null, false if result is null.
    • Constructor Detail

      • NullAs

        private NullAs()
    • Method Detail

      • values

        public static RexImpTable.NullAs[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RexImpTable.NullAs c : RexImpTable.NullAs.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RexImpTable.NullAs valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • handle

        public Expression handle​(Expression x)
        Adapts an expression with "normal" result to one that adheres to this particular policy.