drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitalii Diravka (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3510) Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL identifiers
Date Mon, 06 Feb 2017 17:19:41 GMT

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

Vitalii Diravka commented on DRILL-3510:
----------------------------------------

Instead of a boolean ANSI_QUOTES option, I implemented an EnumeratedString QUOTING_IDENTIFIERS_CHARACTER
option. So drill will support three quoting identifier characters: BACK_TICK( ` ), DOUBLE_QUOTE(
" ), BRACKET( [ ). It is associated with calcite parser, which supports three characters now:
[org.apache.calcite.avatica.util.Quoting.java|https://github.com/apache/calcite/blob/0938c7b6d767e3242874d87a30d9112512d9243a/avatica/core/src/main/java/org/apache/calcite/avatica/util/Quoting.java#L20].

To get current server session options as metadta for jdbc client, a new RPC request  is implemented.

> 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.15#6346)

Mime
View raw message