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

Syntax error when parsing CASE expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • SQL - Translator SQL++
    • None

    Description

      The following query fails with syntax error 

      SELECT
      CASE WHEN get_year(current_date()) > 0 THEN "abc" ELSE "def" END LIKE "a%" as v1

       

      The workaround is to put parentheses around CASE expression: (CASE ...) LIKE ...

       

      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: