Skip to content

Conversation

i-125
Copy link

@i-125 i-125 commented Dec 25, 2024

resolves #973

Problem

Currently, when using the equal_rowcount test with two models that have zero rows, the test incorrectly returns NULL instead of 0. This leads to test failures, as NULL values are treated as errors in the test.
スクリーンショット 2024-12-25 12 49 58

Solution

This PR modifies the equal_rowcount test to return 0 when both models being compared have zero rows, instead of returning NULL. This change ensures that the test passes as expected in scenarios where both models contain no data.
スクリーンショット 2024-12-25 12 50 03

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)

@i-125 i-125 changed the title Fix: return 0 in equal_rowcount when both models have zero rows Fix: return 0 in equal_rowcount when both models have 0 rows Dec 26, 2024
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.

dbt_utils.equal_rowcount error when comparing tables with 0 rows

1 participant