Skip to content

Convert GREATEST_IGNORE_NULLS and LEAST_IGNORE_NULLS - #113

Closed
kvlonge wants to merge 2 commits into
fix/d215-lag-leadfrom
fix/d215-ignore-nulls
Closed

kvlonge wants to merge 2 commits into
fix/d215-lag-leadfrom
fix/d215-ignore-nulls

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Stacked on #98 (fix/d215-lag-lead); review this diff against that branch.

What changes

GREATEST_IGNORE_NULLS and LEAST_IGNORE_NULLS now convert. They share the LEAST/GREATEST rule and skip NULLs as DuckDB's own greatest/least do, returning NULL only when every argument is NULL. Both join fn:GREATEST and fn:LEAST in numeric_range's constructs in sqlquack.toml.

Evidence

The D94 gate runs on the landing head after #98 lands.

They share LEAST/GREATEST's rule, skipping NULLs as DuckDB's own
greatest/least do, NULL only when every argument is. They join
fn:GREATEST and fn:LEAST in numeric_range's constructs. Recorded
cases t001, t003, t004 and t005 of both files now match; t002
(text first beside a number) stays refused by text_number_scale.
Against #98's baseline (4ce4490): 0 regressions, 8 statements
refused -> matching (greatest- and least-ignore-nulls t001, t003, t004,
t005); no form changes. verify-recorded: 11606 cases, 7664 passed,
0 failed, 220 of 220 verified.

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train.

@kvlonge kvlonge closed this Nov 8, 2026
@kvlonge
kvlonge deleted the fix/d215-ignore-nulls branch November 9, 2026 21:31
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.

1 participant