Skip to content
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 #383

Merged
merged 10 commits into from
Dec 19, 2024

Conversation

adrianburusdbt
Copy link
Contributor

@adrianburusdbt adrianburusdbt commented Dec 17, 2024

resolves #

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.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development, and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX

@adrianburusdbt adrianburusdbt requested a review from a team as a code owner December 17, 2024 09:15
Copy link

cla-bot bot commented Dec 17, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @adrianburusdbt

@adrianburusdbt adrianburusdbt marked this pull request as draft December 17, 2024 09:17
Copy link

cla-bot bot commented Dec 17, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @adrianburusdbt

Copy link

cla-bot bot commented Dec 17, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @adrianburusdbt

@cla-bot cla-bot bot added the cla:yes label Dec 17, 2024
@adrianburusdbt adrianburusdbt marked this pull request as ready for review December 17, 2024 13:42
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @mikealfare for doing the bulk of CR here.

@VersusFacit VersusFacit merged commit 048cb2b into main Dec 19, 2024
32 checks passed
@VersusFacit VersusFacit deleted the fix_null_equality_110 branch December 19, 2024 00:30
VersusFacit added a commit that referenced this pull request Dec 19, 2024
@adrianburusdbt adrianburusdbt restored the fix_null_equality_110 branch December 19, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants