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

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

GitHub user vdiravka opened a pull request:

    https://github.com/apache/drill/pull/520

    DRILL-3510: Add ANSI_QUOTES option so that Drill's SQL Parser will 
recognize ANSI_SQL identifiers

    - added calcite's Lex.MYSQL_ANSI (double quote) supporting for SQL 
identifiers;
    - replaced drill's SqlParser.Config with calcite's one;
    - added unit test TestSqlConverter - testAnsiQuotes();
    - upgraded getIdentifierQuoteString() for drill's database metadata;
    - upgraded unit test testGetIdentifierQuoteString();

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vdiravka/drill DRILL-3510

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/520.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #520
    
----
commit bccb92f4557306ee76f06435211a80cf9464c656
Author: Vitalii Diravka <[email protected]>
Date:   2016-05-20T20:11:33Z

    DRILL-3510: Add ANSI_QUOTES option so that Drill's SQL Parser will 
recognize ANSI_SQL identifiers
    - replaced drill's SqlParser.Config with calcite's one;
    - added calcite's Lex.MYSQL_ANSI (double quote) supporting for SQL 
identifiers;
    - added unit test TestSqlConverter - testAnsiQuotes();
    - upgraded getIdentifierQuoteString() for  drill's database metadata;
    - upgraded unit test testGetIdentifierQuoteString();

----


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

Reply via email to