Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 83F3B200C13 for ; Mon, 6 Feb 2017 18:19:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 82375160B56; Mon, 6 Feb 2017 17:19:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CBC52160B53 for ; Mon, 6 Feb 2017 18:19:46 +0100 (CET) Received: (qmail 60550 invoked by uid 500); 6 Feb 2017 17:19:46 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 60540 invoked by uid 99); 6 Feb 2017 17:19:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2017 17:19:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 82B84180BB9 for ; Mon, 6 Feb 2017 17:19:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NluawffnmyYf for ; Mon, 6 Feb 2017 17:19:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8D6A35FC06 for ; Mon, 6 Feb 2017 17:19:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A1FA4E05E9 for ; Mon, 6 Feb 2017 17:19:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id F0F9125297 for ; Mon, 6 Feb 2017 17:19:41 +0000 (UTC) Date: Mon, 6 Feb 2017 17:19:41 +0000 (UTC) From: "Vitalii Diravka (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3510) Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 06 Feb 2017 17:19:47 -0000 [ 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)