Skip to content

Optimize CASE expression for "expr or expr" usage #11638

@andygrove

Description

@andygrove

Is your feature request related to a problem or challenge?

In DataFusion Comet, we have a custom IfExpr for IF(condition, true_expr, false_expr). In apache/datafusion-comet#681 we removed its evaluate implementation and instead delegate to CaseExpr. This resulted in great performance improvements for the "column or null" and "scalar or scalar" cases thanks to recent optimizations in DataFusion, but resulted in a small regression for the "expr or expr" case.

Describe the solution you'd like

I would like to see if we can optimize for the "expr or expr" cases, learning from the original IfExpr implementation code.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions