Enum Class InvocationConvention.InvocationReturnConvention

java.lang.Object
java.lang.Enum<InvocationConvention.InvocationReturnConvention>
io.trino.spi.function.InvocationConvention.InvocationReturnConvention
All Implemented Interfaces:
Serializable, Comparable<InvocationConvention.InvocationReturnConvention>, Constable
Enclosing class:
InvocationConvention

public static enum InvocationConvention.InvocationReturnConvention extends Enum<InvocationConvention.InvocationReturnConvention>
  • Enum Constant Details

    • FAIL_ON_NULL

      public static final InvocationConvention.InvocationReturnConvention FAIL_ON_NULL
      The function will never return a null value. It is not possible to adapt a NEVER_NULL argument to a BOXED_NULLABLE or NULL_FLAG argument when this return convention is used.
    • DEFAULT_ON_NULL

      public static final InvocationConvention.InvocationReturnConvention DEFAULT_ON_NULL
      When a null is passed to a never null argument, the function will not be invoked, and the Java default value for the return type will be returned. This can not be used as an actual function return convention, and instead is only used for adaptation.
    • NULLABLE_RETURN

      public static final InvocationConvention.InvocationReturnConvention NULLABLE_RETURN
      The function may return a null value. When a null is passed to a never null argument, the function will not be invoked, and a null value is returned.
    • BLOCK_BUILDER

      public static final InvocationConvention.InvocationReturnConvention BLOCK_BUILDER
      Return value is witten to a BlockBuilder passed as the last argument. When a null is passed to a never null argument, the function will not be invoked, and a null is written to the block builder.
    • FLAT_RETURN

      public static final InvocationConvention.InvocationReturnConvention FLAT_RETURN
      Return value is written to flat memory passed as the last 5 arguments to the function. It is not possible to adapt a NEVER_NULL argument to a BOXED_NULLABLE or NULL_FLAG argument when this return convention is used.
  • Method Details

    • 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

      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
    • isNullable

      public boolean isNullable()
    • getParameterCount

      public int getParameterCount()