Commit e2add69
authored
fix(recency): handle empty tables returning NULL (dbt-labs#1065)
When a table is empty, MAX(field) returns NULL. The comparison
NULL < threshold evaluates to NULL (not TRUE), causing the WHERE
clause to filter out the row and incorrectly pass the test.
This fix adds 'OR most_recent IS NULL' to properly fail the test
when a table has no data within the recency window, including when
the table is completely empty.1 parent ef562ba commit e2add69
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
0 commit comments