Skip to content

Commit

Permalink
fix: return 0 in equal_rowcount when both models have zero rows
Browse files Browse the repository at this point in the history
  • Loading branch information
i-125 committed Dec 25, 2024
1 parent 5c9dc0d commit d1225fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/generic_tests/equal_rowcount.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}

{#-- Needs to be set at parse time, before we return '' below --#}
{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}
{{ config(fail_calc = 'coalesce(sum(diff_count), 0)') }}

{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}
{%- if not execute -%}
Expand Down

0 comments on commit d1225fd

Please sign in to comment.