-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
A clear and concise description of what the bug is.
The type of case expression is not checked when building the plan.
To Reproduce
DataFusion CLI v15.0.0
❯ create table t as select 2 as a;
0 rows in set. Query took 0.013 seconds.
❯ select case
when a = 1 then true
when a = 2 then 'abc'
else 123
end
from t;
Internal("The type of Boolean AND Utf8 of binary physical should be same")Expected behavior
We should return a DatafusionError::Plan(...), instead of an Internal error.
Additional context
The CaseBuilder does some type checking, but it seems that it is bypassed.
https://github.com/apache/arrow-datafusion/blob/c2f199adbec8b650de5668c97675f8a757607df8/datafusion/expr/src/conditional_expressions.rs#L100-L110
- Check
whenexpr - Check
thenandelse
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working