Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2748

CASE expression fails if default value is TRUE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.4.1
    • 0.9.5
    • RT - Runtime
    • 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.

      Attachments

        Activity

          People

            dlychagin-cb Dmitry Lychagin
            dlychagin-cb Dmitry Lychagin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: