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

[CT-271] [Feature] not_null test selects column instead of * #4777

Merged
merged 6 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changes/unreleased/Features-20220309-163817.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: Features
body: Change behaviour of `non_null` test so that it only `select`s all columns if
`--store-failures` is enabled.
time: 2022-03-09T16:38:17.160568Z
custom:
Author: willbowditch
Issue: "4769"
PR: "4777"
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% macro default__test_not_null(model, column_name) %}

select *
{% set column_list = '*' if should_store_failures() else column_name %}

select {{ column_list }}
from {{ model }}
where {{ column_name }} is null

Expand Down