Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
After ReduceExpressionsRule#reduceExpressionsInternal()[1],
CAST(CASE WHEN x then true WHEN y then TRUE ELSE false): boolean nullable (exp1)
will be changed to
WHEN x then CAST(true): boolean nullable WHEN y then CAST(true): boolean nullable ELSE CAST(false): boolean nullable. (exp2)
Then exp1 is considered as reduced. In the next step, by ReduceExpressionsRule#simplifyPreservingType()[2], exp2 will be changed to
CAST(CASE WHEN x then true WHEN y then TRUE ELSE false): boolean nullable (exp3)
, which is exactly the same as exp1.
Though exp1 is actually not reduced, it is still considered as reduced[3], which leads to CannotPlanException because of setImportance(project, 0.0)[4].
Attachments
Issue Links
- links to