Skip to content

Snowpark Project definition: support marking UDFs as "STRICT" and "IMMUTABLE" #2226

@gwerbin-tive

Description

@gwerbin-tive

Description

It would be useful if we could specify these options in the Snowpark YAML project definition. These options are already supported in the Snowpark Python API.

Hypothetical example:

entities:

  hello_function:
    type: function
    identifier:
      name: hello_function
    handler: functions.hello_function
    signature:
      - name: name
        type: string
    returns: string
    strict: true
    immutable: true
    meta:
      use_mixins:
        - snowpark_shared

Context

RETURNS NULL ON NULL INPUT / STRICT makes UDF handler development easier by allowing the author to ignore null inputs. IMMUTABLE can be important for optimization in certain situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions