Skip to content

[UDFs][BUG] Generic CREATE OR REPLACE FUNCTION breaks in some data warehouses when altering an existing function #1477

@QMalcolm

Description

@QMalcolm

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Which packages are affected?

  • dbt-adapters
  • dbt-tests-adapter
  • dbt-athena
  • dbt-athena-community
  • dbt-bigquery
  • dbt-postgres
  • dbt-redshift
  • dbt-snowflake
  • dbt-spark

Current Behavior

Some adapters don't support using CREATE OR REPLACE ... for functions when an "immutable" property of the function is changed (return type, volatility, etc). When you modify an "immutable" property and build the function, an exception gets raised.

Expected Behavior

The "old" function should go away, and the "new" function should properly exist. No exception should get raised.

Steps To Reproduce

  1. Create a function .sql and .yml
  2. run dbt build
  3. change the return type of the function
  4. run dbt build

Relevant log output

Environment

- OS:
- Python:
- dbt-adapters:
- <adapter>:

Additional Context

No response

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working as documented

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions