hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navis Ryu" <navis....@nexr.com>
Subject Re: Review Request 25059: Ambiguous column reference error on query
Date Tue, 14 Oct 2014 06:33:10 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25059/
-----------------------------------------------------------

(Updated Oct. 14, 2014, 6:33 a.m.)


Review request for hive.


Changes
-------

Addressed comments


Bugs: HIVE-7733
    https://issues.apache.org/jira/browse/HIVE-7733


Repository: hive-git


Description
-------

{noformat}
CREATE TABLE agg1 
  ( 
     col0 INT, 
     col1 STRING, 
     col2 DOUBLE 
  ); 

explain SELECT single_use_subq11.a1 AS a1, 
       single_use_subq11.a2 AS a2 
FROM   (SELECT Sum(agg1.col2) AS a1 
        FROM   agg1 
        GROUP  BY agg1.col0) single_use_subq12 
       JOIN (SELECT alias.a2 AS a0, 
                    alias.a1 AS a1, 
                    alias.a1 AS a2 
             FROM   (SELECT agg1.col1 AS a0, 
                            '42'      AS a1, 
                            agg1.col0 AS a2 
                     FROM   agg1 
                     UNION ALL 
                     SELECT agg1.col1 AS a0, 
                            '41'      AS a1, 
                            agg1.col0 AS a2 
                     FROM   agg1) alias 
             GROUP  BY alias.a2, 
                       alias.a1) single_use_subq11 
         ON ( single_use_subq11.a0 = single_use_subq11.a0 );
{noformat}

Gets the following error:
FAILED: SemanticException [Error 10007]: Ambiguous column reference a2
Looks like this query had been working in 0.12 but starting failing with this error in 0.13


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java b3c4b47 
  ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java 86e4602 
  ql/src/java/org/apache/hadoop/hive/ql/parse/RowResolver.java 9c55379 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java e1eca13 
  ql/src/test/queries/clientnegative/ambiguous_col0.q 46349c6 
  ql/src/test/queries/clientnegative/ambiguous_col1.q 9e8bcbd 
  ql/src/test/queries/clientnegative/ambiguous_col2.q 33d4aed 
  ql/src/test/queries/clientpositive/complex_alias.q PRE-CREATION 
  ql/src/test/results/clientnegative/ambiguous_col.q.out 237c21f 
  ql/src/test/results/clientnegative/ambiguous_col0.q.out 237c21f 
  ql/src/test/results/clientnegative/ambiguous_col1.q.out 237c21f 
  ql/src/test/results/clientnegative/ambiguous_col2.q.out 237c21f 
  ql/src/test/results/clientpositive/ambiguous_col.q.out e8760f1 
  ql/src/test/results/clientpositive/complex_alias.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/25059/diff/


Testing
-------


Thanks,

Navis Ryu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message