You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (JIRA)" <ji...@apache.org> on 2017/07/31 09:20:00 UTC

[jira] [Updated] (DRILL-3510) Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL identifiers

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

Vitalii Diravka updated DRILL-3510:
-----------------------------------
    Description: 
Currently Drill's SQL parser uses backtick as identifier quotes, the same as what MySQL does. However, this is different from ANSI SQL specification, where double quote is used as identifier quotes.  

MySQL has an option "ANSI_QUOTES", which could be switched on/off by user:
{code}
SET sql_mode='ANSI_QUOTES';
{code}. 
Drill should follow the same way, so that Drill users do not have to rewrite their existing queries, if their queries use double quotes. 

Using of different quotes for queries in DRILL with this fix:
- a new "planner.parser.quoting_identifiers" system/session option is introduced added supporting of quoting identifiers with DOUBLE_QUOTES or BRACKETS via setting new
  sys/sess EnumString option QUOTING_IDENTIFIERS;
- added possibility of setting QUOTING_IDENTIFIERS by the jdbc connection URL string; 

   


  was:
Currently Drill's SQL parser uses backtick as identifier quotes, the same as what MySQL does. However, this is different from ANSI SQL specification, where double quote is used as identifier quotes.  

MySQL has an option "ANSI_QUOTES", which could be switched on/off by user. Drill should follow the same way, so that Drill users do not have to rewrite their existing queries, if their queries use double quotes. 

{code}
SET sql_mode='ANSI_QUOTES';
{code}
   



> Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL identifiers 
> --------------------------------------------------------------------------------------
>
>                 Key: DRILL-3510
>                 URL: https://issues.apache.org/jira/browse/DRILL-3510
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: SQL Parser
>            Reporter: Jinfeng Ni
>            Assignee: Vitalii Diravka
>              Labels: doc-impacting, ready-to-commit
>             Fix For: 1.11.0
>
>         Attachments: DRILL-3510.patch, DRILL-3510.patch
>
>
> Currently Drill's SQL parser uses backtick as identifier quotes, the same as what MySQL does. However, this is different from ANSI SQL specification, where double quote is used as identifier quotes.  
> MySQL has an option "ANSI_QUOTES", which could be switched on/off by user:
> {code}
> SET sql_mode='ANSI_QUOTES';
> {code}. 
> Drill should follow the same way, so that Drill users do not have to rewrite their existing queries, if their queries use double quotes. 
> Using of different quotes for queries in DRILL with this fix:
> - a new "planner.parser.quoting_identifiers" system/session option is introduced added supporting of quoting identifiers with DOUBLE_QUOTES or BRACKETS via setting new
>   sys/sess EnumString option QUOTING_IDENTIFIERS;
> - added possibility of setting QUOTING_IDENTIFIERS by the jdbc connection URL string; 
>    



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