[
https://issues.apache.org/jira/browse/CALCITE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835900#comment-16835900
]
Julian Hyde commented on CALCITE-3038:
--------------------------------------
Note that the cause is that DESCRIBE is trying to do a lot of things (some
would say too many). It deals with "DESCRIBE tableName" and also "DESCRIBE
statement" (where "statement" is, for example, "SELECT"). So it needs to use
lookahead to see whether the token after DESCRIBE is a table name or a
statement. Perhaps this issue could be fixed, but the design is creaking.
> DESCRIBE throws exception when table name is non-reserved keyword
> -----------------------------------------------------------------
>
> Key: CALCITE-3038
> URL: https://issues.apache.org/jira/browse/CALCITE-3038
> Project: Calcite
> Issue Type: Bug
> Reporter: Rui Li
> Priority: Major
>
> For example, suppose I have a table named {{source}}. {{DESCRIBE source}}
> throws exception:
> {noformat}
> CalciteException: Non-query expression encountered in illegal context
> {noformat}
> Not sure if this behavior is intended. But if a user is allowed to create a
> table named {{source}} w/o quoting it, it seems strange to require quoting
> when describe the table.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)