You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/04/20 04:27:00 UTC

[jira] [Commented] (ASTERIXDB-2356) Syntax error when parsing CASE expression

    [ https://issues.apache.org/jira/browse/ASTERIXDB-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16445281#comment-16445281 ] 

ASF subversion and git services commented on ASTERIXDB-2356:
------------------------------------------------------------

Commit 5fbd04be09f577c14014c746b26ae9cd2a04b0f2 in asterixdb's branch refs/heads/master from [~dlychagin-cb]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=5fbd04b ]

[ASTERIXDB-2356][SQL] Syntax error when parsing CASE expression

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Move CASE expression from Expression production to PrimaryExpr

Change-Id: Ia9ded0d7a20aaa9cd81240821f5b903f262b0b6a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2571
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Taewoo Kim <wa...@gmail.com>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>


> Syntax error when parsing CASE expression
> -----------------------------------------
>
>                 Key: ASTERIXDB-2356
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2356
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: SQL - Translator SQL++
>            Reporter: Dmitry Lychagin
>            Assignee: Dmitry Lychagin
>            Priority: Minor
>
> 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 ...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)