hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-7733) Ambiguous column reference error on query
Date Fri, 03 Oct 2014 17:59:34 GMT

    [ https://issues.apache.org/jira/browse/HIVE-7733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158250#comment-14158250
] 

Ashutosh Chauhan commented on HIVE-7733:
----------------------------------------

 I agree. ambiguous_col.q should fail under uniqueness assumption, which I think is a valid
assumption to have. I also tested queries listed in that test case on mysql and they failed
with error "ambiguous column" Also, given that changes introduced in HIVE-2723 where this
test case was added was not consistent with Hive itself (HIVE-3882), I think we should not
allow such ambiguity in queries. Lets move ambiguous_col.q test case to negative tests.  
[~navis] Would you like to rebase this patch. Lets get this one in.

> Ambiguous column reference error on query
> -----------------------------------------
>
>                 Key: HIVE-7733
>                 URL: https://issues.apache.org/jira/browse/HIVE-7733
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>            Reporter: Jason Dere
>            Assignee: Navis
>         Attachments: HIVE-7733.1.patch.txt, HIVE-7733.2.patch.txt, HIVE-7733.3.patch.txt,
HIVE-7733.4.patch.txt
>
>
> {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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message