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/08/19 19:57:00 UTC
[jira] [Updated] (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 updated CALCITE-2479:
---------------------------------------
Summary: SqlAdvisor: automatically quote identifiers that look like SQL keywords (was: SqlAdvisor: automatically quote SQL keywords)
> 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
>
> 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)