-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve performance of CASE WHEN x THEN y ELSE NULL expressions
#20097
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
base: main
Are you sure you want to change the base?
Conversation
|
run benchmark case_when |
|
🤖 |
|
run benchmark tpcds |
|
🤖: Benchmark completed Details
|
|
🤖 |
|
🤖: Benchmark completed Details
|
Which issue does this PR close?
Rationale for this change
While reviewing #19994 it became clear the optimised
ExpressionOrExpressioncode path was not being used when the case expression has noelsebranch or haselse null. In those situations the general evaluation strategies could end up being used.This PR refines the
ExpressionOrExpressionimplementation to also handleelse nullexpressions.What changes are included in this PR?
Use
ExpressionOrExpressionfor expressions of the formCASE WHEN x THEN y [ELSE NULL]Are these changes tested?
Covered by existing SLTs
Are there any user-facing changes?
No