Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A09C173E3 for ; Wed, 29 Oct 2014 00:46:10 +0000 (UTC) Received: (qmail 78898 invoked by uid 500); 29 Oct 2014 00:46:10 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 78854 invoked by uid 500); 29 Oct 2014 00:46:10 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 78842 invoked by uid 99); 29 Oct 2014 00:46:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 00:46:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 00:46:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ED34623889CB; Wed, 29 Oct 2014 00:44:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1635017 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Date: Wed, 29 Oct 2014 00:44:18 -0000 To: commits@hive.apache.org From: sershe@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141029004418.ED34623889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sershe Date: Wed Oct 29 00:44:18 2014 New Revision: 1635017 URL: http://svn.apache.org/r1635017 Log: HIVE-8635 : CBO: ambiguous_col negative test no longer fails (Sergey Shelukhin, reviewed by Ashutosh Chauhan) Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1635017&r1=1635016&r2=1635017&view=diff ============================================================================== --- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original) +++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Wed Oct 29 00:44:18 2014 @@ -14093,7 +14093,6 @@ public class SemanticAnalyzer extends Ba QBParseInfo qbp = getQBParseInfo(qb); String selClauseName = qbp.getClauseNames().iterator().next(); ASTNode selExprList = qbp.getSelForClause(selClauseName); - LOG.error("TODO# for select clause, got " + selExprList.dump()); // 2.Row resolvers for input, output RowResolver out_rwsch = new RowResolver(); @@ -14215,7 +14214,10 @@ public class SemanticAnalyzer extends Ba exp.getWritableObjectInspector(), tabAlias, false); colInfo.setSkewedCol((exp instanceof ExprNodeColumnDesc) ? ((ExprNodeColumnDesc) exp) .isSkewedCol() : false); - out_rwsch.put(tabAlias, colAlias, colInfo); + if (!out_rwsch.putWithCheck(tabAlias, colAlias, null, colInfo)) { + throw new OptiqSemanticException("Cannot add column to RR: " + tabAlias + "." + + colAlias + " => " + colInfo + " due to duplication, see previous warnings"); + } if (exp instanceof ExprNodeColumnDesc) { ExprNodeColumnDesc colExp = (ExprNodeColumnDesc) exp;