dbt-labs / dbt-spark

dbt-spark contains all of the code enabling dbt to work with Apache Spark and Databricks
https://getdbt.com
Apache License 2.0
405 stars 227 forks source link

[CT-2219] [Spark] Implement constraint_support on SparkAdapter #656

Closed MichelleArk closed 1 year ago

MichelleArk commented 1 year ago

Core issue: https://github.com/dbt-labs/dbt-core/issues/7067

Implement constraint_support on the SparkAdapter to satisfy:

constraint type support
not_null not enforced
primary_key not enforced
foreign_key not enforced
unique not enforced
check not enforced

(from: https://github.com/dbt-labs/dbt-core/issues/7067#issuecomment-1447281379)

Additionally, remove the not_null-related warning raised in spark__alter_column_set_constraints: https://github.com/dbt-labs/dbt-spark/blob/main/dbt/include/spark/macros/adapters.sql#L202-L204