hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zs...@apache.org
Subject svn commit: r908174 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/test/queries/clientnegative/ambiguous_col.q ql/src/test/results/clientnegative/ambiguous_col.q.out
Date Tue, 09 Feb 2010 19:40:40 GMT
Author: zshao
Date: Tue Feb  9 19:40:39 2010
New Revision: 908174

URL: http://svn.apache.org/viewvc?rev=908174&view=rev
Log:
HIVE-1140. Fix incorrect ambiguous column reference error message. (Paul Yang via zshao)

Added:
    hadoop/hive/trunk/ql/src/test/queries/clientnegative/ambiguous_col.q
    hadoop/hive/trunk/ql/src/test/results/clientnegative/ambiguous_col.q.out
Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=908174&r1=908173&r2=908174&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Feb  9 19:40:39 2010
@@ -149,6 +149,9 @@
     HIVE-1141. Remove recursive call in FetchOperator.getNextRow.
     (Zheng Shao via He Yongqiang)
 
+    HIVE-1140. Fix incorrect ambiguous column reference error message.
+    (Paul Yang via zshao)
+
 Release 0.5.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=908174&r1=908173&r2=908174&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Tue
Feb  9 19:40:39 2010
@@ -1805,8 +1805,7 @@
         col_list.add(exp);
         if (!StringUtils.isEmpty(alias)
             && (out_rwsch.get(null, colAlias) != null)) {
-          throw new SemanticException(ErrorMsg.AMBIGUOUS_COLUMN.getMsg(expr
-              .getChild(1)));
+          throw new SemanticException(ErrorMsg.AMBIGUOUS_COLUMN.getMsg(colAlias));
         }
         out_rwsch.put(tabAlias, colAlias, new ColumnInfo(
             getColumnInternalName(pos), exp.getTypeInfo(), tabAlias, false));

Added: hadoop/hive/trunk/ql/src/test/queries/clientnegative/ambiguous_col.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientnegative/ambiguous_col.q?rev=908174&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientnegative/ambiguous_col.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientnegative/ambiguous_col.q Tue Feb  9 19:40:39
2010
@@ -0,0 +1 @@
+FROM (SELECT key, concat(value) AS key FROM src) a SELECT a.key;

Added: hadoop/hive/trunk/ql/src/test/results/clientnegative/ambiguous_col.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientnegative/ambiguous_col.q.out?rev=908174&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientnegative/ambiguous_col.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientnegative/ambiguous_col.q.out Tue Feb  9 19:40:39
2010
@@ -0,0 +1 @@
+FAILED: Error in semantic analysis: Ambiguous Column Reference key



Mime
View raw message