You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (Jira)" <ji...@apache.org> on 2020/06/23 20:46:00 UTC

[jira] [Resolved] (ASTERIXDB-2748) CASE expression fails if default value is TRUE

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Lychagin resolved ASTERIXDB-2748.
----------------------------------------
    Resolution: Fixed

> CASE expression fails if default value is TRUE
> ----------------------------------------------
>
>                 Key: ASTERIXDB-2748
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2748
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: RT - Runtime
>    Affects Versions: 0.9.4.1
>            Reporter: Dmitry Lychagin
>            Assignee: Dmitry Lychagin
>            Priority: Major
>             Fix For: 0.9.5
>
>
> {noformat}
> SELECT (CASE WHEN t = 2 THEN False ELSE True END) FROM [1] t 
> {noformat}
> fails with 
> {noformat}
> 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)
> {noformat}
> This error happens when the default value returned by the CASE expression is TRUE and none of the WHEN clauses match at runtime.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)