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

fix equal_rowcount between 2 different tables #987

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

light-le
Copy link

add coalesce to count_a and count_b before taking absolute difference so it doesn't result as null

resolves #986

Problem

When equal_rowcount is applied between 2 tables of different groupby keys, the test still passes.

Solution

The root problem was caused by coalesce at diff_count because mismatching keys could cause null diff_count. Therefore coalesce should be applied where the absolute difference is taking place

Checklist

  • This code is associated with an issue which has been triaged and accepted for development.
  • 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
  • I have updated the README.md (if applicable)

add coalesce to count_a and count_b before taking absolute difference so it doesn't result as null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

equal_rowcount pass the test when comparing 2 different tables of the same groupby columns
1 participant