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 7F6A8200C13 for ; Mon, 6 Feb 2017 18:00:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7DAF4160B62; Mon, 6 Feb 2017 17:00:48 +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 C6235160B53 for ; Mon, 6 Feb 2017 18:00:47 +0100 (CET) Received: (qmail 99891 invoked by uid 500); 6 Feb 2017 17:00:47 -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 99882 invoked by uid 99); 6 Feb 2017 17:00:47 -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:00:47 +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 7E390182132 for ; Mon, 6 Feb 2017 17:00:46 +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 Q2uwGsrAiNFZ for ; Mon, 6 Feb 2017 17:00: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 79CFB5F644 for ; Mon, 6 Feb 2017 17:00: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 739E0E05BB for ; Mon, 6 Feb 2017 17:00:43 +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 CD32E25292 for ; Mon, 6 Feb 2017 17:00:42 +0000 (UTC) Date: Mon, 6 Feb 2017 17:00:42 +0000 (UTC) From: "ASF GitHub Bot (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:00:48 -0000 [ https://issues.apache.org/jira/browse/DRILL-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15854357#comment-15854357 ] ASF GitHub Bot commented on DRILL-3510: --------------------------------------- Github user vdiravka commented on a diff in the pull request: https://github.com/apache/drill/pull/520#discussion_r99624485 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java --- @@ -760,6 +765,24 @@ public void abort(Executor executor) throws SQLException { } } + @Override + public boolean useAnsiQuotedIdentifiers() throws SQLException { + boolean systemOption = false; + Boolean sessionOption = null; + String sql = String.format("select type, bool_val from sys.options where name = '%s'", + PlannerSettings.ANSI_QUOTES_KEY); + ResultSet rs = executeSql(sql); --- End diff -- Done. New RPC request is implemented. RPC response returns `ServerProperties` that represent the list of server session options. > 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)