Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.4.1
-
None
Description
SELECT (CASE WHEN t = 2 THEN False ELSE True END) FROM [1] t
fails with
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4 at org.apache.asterix.runtime.evaluators.functions.SwitchCaseDescriptor$2$1.evaluate(SwitchCaseDescriptor.java:83)
This error happens when the default value returned by the CASE expression is TRUE and none of the WHEN clauses match at runtime.