Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA754176C5 for ; Wed, 2 Sep 2015 14:28:48 +0000 (UTC) Received: (qmail 60263 invoked by uid 500); 2 Sep 2015 14:28:45 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 60235 invoked by uid 500); 2 Sep 2015 14:28:45 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 60225 invoked by uid 99); 2 Sep 2015 14:28:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 14:28:45 +0000 Date: Wed, 2 Sep 2015 14:28:45 +0000 (UTC) From: "Gabriel C Balan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-6013) Supporting Quoted Identifiers in Column Names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14727417#comment-14727417 ] Gabriel C Balan commented on HIVE-6013: --------------------------------------- Should commas be allowed inside quoted (back-tick-ed) column names? It seems I am able to create a table with commas in the name of the *last* column, but queries naming the column explicitly don't work. {code} hive> set hive.support.quoted.identifiers; hive.support.quoted.identifiers=column hive> create table t1(`a,` string); OK Time taken: 0.245 seconds hive> create table t2(`a,` string, b string); FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe: columns has 3 elements while columns.types has 2 elements!) hive> describe t1; OK a, string Time taken: 0.698 seconds, Fetched: 1 row(s) hive> select `a,` from t1; FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or column reference 'a,': (possible column names are: a) {code} > Supporting Quoted Identifiers in Column Names > --------------------------------------------- > > Key: HIVE-6013 > URL: https://issues.apache.org/jira/browse/HIVE-6013 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Harish Butani > Assignee: Harish Butani > Fix For: 0.13.0 > > Attachments: HIVE-6013.1.patch, HIVE-6013.2.patch, HIVE-6013.3.patch, HIVE-6013.4.patch, HIVE-6013.5.patch, HIVE-6013.6.patch, HIVE-6013.7.patch, QuotedIdentifier.html > > > Hive's current behavior on Quoted Identifiers is different from the normal interpretation. Quoted Identifier (using backticks) has a special interpretation for Select expressions(as Regular Expressions). Have documented current behavior and proposed a solution in attached doc. > Summary of solution is: > - Introduce 'standard' quoted identifiers for columns only. > - At the langauage level this is turned on by a flag. > - At the metadata level we relax the constraint on column names. -- This message was sent by Atlassian JIRA (v6.3.4#6332)