Enum Class TableFunctionParameterKind

java.lang.Object
java.lang.Enum<TableFunctionParameterKind>
dev.frostlake.executor.TableFunctionParameterKind
All Implemented Interfaces:
Serializable, Comparable<TableFunctionParameterKind>, Constable

public enum TableFunctionParameterKind extends Enum<TableFunctionParameterKind>
What a table function's parameter will take. Snowflake type-checks these at COMPILE time and names the offending type in the refusal — FLATTEN(INPUT =&gt; '[1,2,3]') is invalid type [VARCHAR(7)] for parameter 'INPUT', not a silent coercion of the JSON text.

Each kind lists only the families measured to be REFUSED. A type this enum does not recognise is accepted, so an expression whose type cannot be determined statically can never be rejected here.

  • Enum Constant Details

    • SEMI_STRUCTURED

      public static final TableFunctionParameterKind SEMI_STRUCTURED
      VARIANT, OBJECT or ARRAY. Live refuses VARCHAR, NUMBER, BOOLEAN and DATE alike, so a JSON string has to be parsed (PARSE_JSON) or cast before FLATTEN will look at it.
    • STRING

      public static final TableFunctionParameterKind STRING
      VARCHAR — FLATTEN(…, PATH =&gt; 1) is invalid type [NUMBER(1,0)] for parameter 'PATH'.
    • TIMESTAMP

      public static final TableFunctionParameterKind TIMESTAMP
      TIMESTAMP. The history functions' leading positional parameters are time-range bounds, so QUERY_HISTORY(2) is invalid type [NUMBER(1,0)] for parameter 'END_TIME_RANGE_START' — and so is a date-shaped STRING, which is not implicitly converted.
    • BOOLEAN

      public static final TableFunctionParameterKind BOOLEAN
      BOOLEAN. The string 'TRUE' does NOT count: live answers invalid type [VARCHAR(4)] for parameter 'OUTER', so the flags take a boolean literal.
  • Method Details

    • values

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