-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added equals macro that handles null value comparison #394
Conversation
…bt-adapters into fix_null_equality_110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
✅ redshift: https://github.com/dbt-labs/dbt-redshift/actions/runs/12436459830
✅ snowflake: https://github.com/dbt-labs/dbt-snowflake/actions/runs/12436503051
✅ bigquery: https://github.com/dbt-labs/dbt-bigquery/actions/runs/12436511956
✅ spark: https://github.com/dbt-labs/dbt-spark/actions/runs/12459732059/job/34777655655
I'm waiting on a reply to Mike on why Spark is failing and if it's actually a concern here or not (I doubt it is)
This reverts commit a035cd9.
resolves #
dbt-labs/dbt-core#7873
#159
Problem
Null comparison was not handled properly in the base adapter. While some value comparisons were missing this case altogether, others were fixed but not in a repeatable, organized way.
Solution
Based loosely on #110, but ultimately it's following the suggestions made here: dbt-labs/dbt-core#6997 (comment)
Extracted the logic that was in the test fixture into an 'equals.sql' macro that can be reused and replaced all other usages with this utility macro.
Integration tests with the proposed changes:
https://github.com/dbt-labs/dbt-postgres/actions/runs/12412018685
Checklist