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 E7E2218D64 for ; Mon, 14 Sep 2015 22:57:45 +0000 (UTC) Received: (qmail 42572 invoked by uid 500); 14 Sep 2015 22:57:45 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 42548 invoked by uid 500); 14 Sep 2015 22:57: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 42538 invoked by uid 99); 14 Sep 2015 22:57:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2015 22:57:45 +0000 Date: Mon, 14 Sep 2015 22:57:45 +0000 (UTC) From: "Pengcheng Xiong (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-11815) Correct the column/table names in subquery expression when create a view 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-11815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pengcheng Xiong updated HIVE-11815: ----------------------------------- Attachment: HIVE-11815.01.patch > Correct the column/table names in subquery expression when create a view > ------------------------------------------------------------------------ > > Key: HIVE-11815 > URL: https://issues.apache.org/jira/browse/HIVE-11815 > Project: Hive > Issue Type: Sub-task > Reporter: Pengcheng Xiong > Assignee: Pengcheng Xiong > > Right now Hive does not quote column/table names in subquery expression when create a view. For example > {code} > hive> > > create table tc (`@d` int); > OK > Time taken: 0.119 seconds > hive> create view tcv as select * from tc b where exists (select a.`@d` from tc a where b.`@d`=a.`@d`); > OK > Time taken: 0.075 seconds > hive> describe extended tcv; > OK > @d int > Detailed Table Information Table(tableName:tcv, dbName:default, owner:pxiong, createTime:1442250005, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:@d, type:int, comment:null)], location:null, inputFormat:org.apache.hadoop.mapred.SequenceFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:null, parameters:{}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[], parameters:{transient_lastDdlTime=1442250005}, viewOriginalText:select * from tc b where exists (select a.@d from tc a where b.@d=a.@d), viewExpandedText:select `b`.`@d` from `default`.`tc` `b` where exists (select a.@d from tc a where b.@d=a.@d), tableType:VIRTUAL_VIEW) > Time taken: 0.063 seconds, Fetched: 3 row(s) > hive> select * from tcv; > FAILED: SemanticException line 1:63 character '@' not supported here > line 1:84 character '@' not supported here > line 1:89 character '@' not supported here in definition of VIEW tcv [ > select `b`.`@d` from `default`.`tc` `b` where exists (select a.@d from tc a where b.@d=a.@d) > ] used as tcv at Line 1:14 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)