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 BE081200C38 for ; Wed, 15 Mar 2017 20:37:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BCD61160B78; Wed, 15 Mar 2017 19:37:46 +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 17A0E160B60 for ; Wed, 15 Mar 2017 20:37:45 +0100 (CET) Received: (qmail 79774 invoked by uid 500); 15 Mar 2017 19:37:45 -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 79758 invoked by uid 99); 15 Mar 2017 19:37:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2017 19:37:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6DB4EC0974 for ; Wed, 15 Mar 2017 19:37:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id rL1pL36TsyrU for ; Wed, 15 Mar 2017 19:37:43 +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 2F7715FE2A for ; Wed, 15 Mar 2017 19:37:43 +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 48C8BE095C for ; Wed, 15 Mar 2017 19:37: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 9A629243B4 for ; Wed, 15 Mar 2017 19:37:41 +0000 (UTC) Date: Wed, 15 Mar 2017 19:37:41 +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: Wed, 15 Mar 2017 19:37:46 -0000 [ https://issues.apache.org/jira/browse/DRILL-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926826#comment-15926826 ] 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_r106263502 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillDatabaseMetaDataImpl.java --- @@ -184,6 +184,17 @@ private ServerMeta getServerMeta() throws SQLException { return serverMeta; } + /** + * The same as {@link DrillDatabaseMetaDataImpl#getServerMeta()} but updates server metadata for the every call + * @return server meta information + * @throws SQLException for error when getting server meta + */ + private ServerMeta getUpdatedServerMeta() throws SQLException { --- End diff -- SQL Server, for example, updates metadata in some cases https://www.mssqltips.com/sqlservertip/1415/determining-set-options-for-a-current-session-in-sql-server/ Quoting_identifiers can be changes as system option. In this case any user can get the right and actual quoting_identifiers method from server_metadata. > 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 > Labels: doc-impacting > Fix For: 1.10.0 > > 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)