You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/07/07 21:25:11 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=15366796#comment-15366796 ] 

ASF GitHub Bot commented on DRILL-3510:
---------------------------------------

Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/520#discussion_r69990123
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java ---
    @@ -274,6 +274,9 @@
       String ENABLE_BULK_LOAD_TABLE_LIST_KEY = "exec.enable_bulk_load_table_list";
       BooleanValidator ENABLE_BULK_LOAD_TABLE_LIST = new BooleanValidator(ENABLE_BULK_LOAD_TABLE_LIST_KEY, false);
     
    +  String ANSI_QUOTES_KEY = "parser.ansi_quotes";
    --- End diff --
    
    this option had better go to PlannerSettings.java, since it's not an option for exec. Also, please follow existing naming convention for new option name. For this case, how about `planner.parser.ansi_quotes`? 
     


> 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
>             Fix For: Future
>
>         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. 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}
>    



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)