You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2017/08/09 07:40:01 UTC

[jira] [Closed] (KYLIN-1090) Cannot query a column whose name is one of the following: year, month, day, hour, minute, second

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

Shaofeng SHI closed KYLIN-1090.
-------------------------------

> Cannot query a column whose name is one of the following: year, month, day, hour, minute, second
> ------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-1090
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1090
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v1.1
>            Reporter: Francesco Palmiotto
>            Assignee: liyang
>
> Suppose we have a query like:
> "select f.year, avg(f.my_measure)
> from fact_table f
> group by f.year"
> This will fail and throw the following error:
> Encountered ". year" at line 1, column 9. Was expecting one of: "FROM" ... "," ... "AS" ... <IDENTIFIER> ... <QUOTED_IDENTIFIER> ... <BACK_QUOTED_IDENTIFIER> ... <BRACKET_QUOTED_IDENTIFIER> ... <UNICODE_QUOTED_IDENTIFIER> ... "." ... "NOT" ... "IN" ... "BETWEEN" ... "LIKE" ... "SIMILAR" ... "=" ... ">" ... "<" ... "<=" ... ">=" ... "<>" ... "+" ... "-" ... "*" ... "/" ... "||" ... "AND" ... "OR" ... "IS" ... "MEMBER" ... "SUBMULTISET" ... "MULTISET" ... "[" ... "." <IDENTIFIER> ... "." <QUOTED_IDENTIFIER> ... "." <BACK_QUOTED_IDENTIFIER> ... "." <BRACKET_QUOTED_IDENTIFIER> ... "." <UNICODE_QUOTED_IDENTIFIER> ... "." "*" ... "(" ...
> I think this is due to the fact that year, month, day, hour, minute and second are all reserved keywords in ANSI SQL.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)