You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (JIRA)" <ji...@apache.org> on 2019/05/07 11:53:00 UTC

[jira] [Commented] (CALCITE-3038) DESCRIBE throws exception when table name is non-reserved keyword

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

Stamatis Zampetakis commented on CALCITE-3038:
----------------------------------------------

I tested the following and it works:

{code:java}
// Some comments here
public void testDescribe()
{
    check("describe table source",
        "DESCRIBE TABLE `SOURCE`");
}
{code}

Using DESCRIBE without a TABLE normally expects a query expression so I think the exception is normal based on the SQL standard.

[~lirui], can you have a look in the discussion in CALCITE-1168 and check  if what I am saying makes sense?

> 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)