You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2018/09/05 14:19:00 UTC

[jira] [Resolved] (CALCITE-2479) SqlAdvisor: automatically quote identifiers that look like SQL keywords

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

Vladimir Sitnikov resolved CALCITE-2479.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.18.0

Fixed in https://git-wip-us.apache.org/repos/asf?p=calcite.git;a=commit;h=c2ae9f0d5b518ea702b4000958b0460e8ef167e1

> SqlAdvisor: automatically quote identifiers that look like SQL keywords
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-2479
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2479
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.18.0
>
>
> Case for SqlAdvisorTest:
> {code:java}  @Test @WithLex(Lex.JAVA) public void testAdviceExpression() {
>     String sql;
>     sql = "select s.`count`+s.co^ from (select 1 `count` from emp) s";
>     assertComplete(sql, "COLUMN(count)\n", "co",
>         ImmutableMap.of("COLUMN(count)", "`count`"));
>   }
> {code}
> It should automatically quote the suggested column name {{count}} since otherwise it is confused with {{count}} keyword.



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