Skip to content

Unify IF and CASE expressions #680

@andygrove

Description

@andygrove

What is the problem the feature request solves?

DataFusion provides CaseExpr for CASE WHEN and Comet has a custom IfExpr for IF(expr, true_expr, false_expr).

IF(a, b, c) is semantically equivalent to CASE WHEN a THEN b ELSE c END, so why do we have two different implementations? We should at least have common code that is used from both, and we should upstream the IF support into DataFusion.

Describe the potential solution

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions