feat: lower CASE WHEN in the planner to CaseExpr - #2661
Open
rishitesh-snt wants to merge 1 commit into
Open
rishitesh-snt wants to merge 1 commit into
rishitesh-snt wants to merge 1 commit into
Conversation
rishitesh-snt
force-pushed
the
feat/case-expr
branch
from
July 24, 2026 11:50
444aa40 to
25b0a1e
Compare
rishitesh-snt
force-pushed
the
feat/case-planner
branch
from
July 24, 2026 11:52
4588a65 to
73cbb7c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/case-expr #2661 +/- ##
==================================================
- Coverage 96.46% 96.41% -0.06%
==================================================
Files 295 294 -1
Lines 52922 52608 -314
==================================================
- Hits 51053 50723 -330
- Misses 1869 1885 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rishitesh-snt
force-pushed
the
feat/case-expr
branch
from
July 25, 2026 14:20
25b0a1e to
633e2a9
Compare
rishitesh-snt
force-pushed
the
feat/case-planner
branch
from
July 25, 2026 14:21
73cbb7c to
353b1ad
Compare
rishitesh-snt
force-pushed
the
feat/case-expr
branch
from
July 27, 2026 04:38
633e2a9 to
f0929d8
Compare
Lowers searched and simple CASE forms to DynProofExpr::try_new_case. CASE without ELSE is rejected (implicit NULL has no representation). Stacked on the CaseExpr primitive PR.
rishitesh-snt
force-pushed
the
feat/case-planner
branch
from
July 27, 2026 04:39
353b1ad to
75e3127
Compare
|
This PR has been marked as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Wires
CASE WHENthrough the planner so SQL queries can use it. The proofprimitive lands in #2659; this PR only lowers the DataFusion
Expr::Casenodeonto it.
What changes are included in this PR?
expr.rslowers searched (CASE WHEN c THEN v ...) and simple(
CASE x WHEN v THEN ...) forms toDynProofExpr::try_new_case, and collectscolumn references for CASE.
representation).
Are these changes tested?
Yes. End-to-end prove/verify (
case_when_matrix_tests.rs) for numeric,multi-arm (up to 4 conditions), varchar, nested, and conditional-aggregation
CASE, plus planning-time rejection tests.
Stacked on #2659 (the CaseExpr primitive); review/merge that first.