feat: Binary CASE WHEN expression with support for nested conditions … #6197
+1,050
−5
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.
Adds support for the "CASE WHEN" SQL expression to the Vortex expression system, including its conversion from DataFusion, benchmarking, and pushdown logic. The main focus is on enabling CASE WHEN expressions to be parsed, converted, and benchmarked, while ensuring only supported forms are handled.
Support for CASE WHEN expressions:
case_whentovortex-array's expression system and re-exported its functions, enabling construction and evaluation of CASE WHEN and nested CASE WHEN expressions. (vortex-array/src/expr/exprs/mod.rs) [1] [2]CaseWhenexpression in theExprSessionso it can be used in expression evaluation. (vortex-array/src/expr/session.rs) [1] [2]DataFusion integration and conversion:
CaseExprto Vortex's nestedcase_whenexpressions, with validation to only support the "searched CASE" form (not "simple CASE"). (vortex-datafusion/src/convert/exprs.rs) [1] [2] [3]vortex-datafusion/src/convert/exprs.rs) [1] [2]Benchmarks and protocol updates:
vortex-array/benches/expr/case_when_bench.rs,vortex-array/Cargo.toml) [1] [2]vortex-proto/proto/expr.proto)Bench: