Skip to content

fix: include wbc_max in SIRS WBC missing-data guard - #2146

Closed
Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/sirs-wbc-max-null-guard
Closed

Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/sirs-wbc-max-null-guard

Conversation

@Chessing234

@Chessing234 Chessing234 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Proposed adding wbc_max to the SIRS missing-data check across the SQL dialects.

closing: the maintainer confirmed wbc_min and wbc_max are null together, so the proposed change does not fix an observed data issue.

@Chessing234
Chessing234 force-pushed the fix/sirs-wbc-max-null-guard branch 2 times, most recently from ff7517b to 4a1cd36 Compare August 9, 2026 13:39

@alistairewj alistairewj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is a no-op because wbc_min and wbc_max are always null/not-null together - please try to avoid PRs which "fix" surface level issues that do not actually appear in the data

@alistairewj

Copy link
Copy Markdown
Member

needs rebasing

WBC scoring uses wbc_min, wbc_max, and bands_max, but the null arm only
checked coalesce(wbc_min, bands_max), so a present wbc_max alone yielded
NULL instead of 0. Align the guard across BigQuery, Postgres, and DuckDB.
@Chessing234
Chessing234 force-pushed the fix/sirs-wbc-max-null-guard branch from 4a1cd36 to 46a2786 Compare August 23, 2026 15:59
@Chessing234

Copy link
Copy Markdown
Contributor Author

rebased onto main. the conflict was a sqlfluff workflow commit bundled onto this branch that main has since fixed its own way, so i dropped it — this is now just the one-line coalesce change across the six dialect copies.

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.

2 participants