You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vineet Garg (JIRA)" <ji...@apache.org> on 2017/02/04 04:34:51 UTC

[jira] [Updated] (HIVE-15812) Scalar subquery with having throws exception

     [ https://issues.apache.org/jira/browse/HIVE-15812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vineet Garg updated HIVE-15812:
-------------------------------
    Attachment: HIVE-15812.1.patch

> Scalar subquery with having throws exception
> --------------------------------------------
>
>                 Key: HIVE-15812
>                 URL: https://issues.apache.org/jira/browse/HIVE-15812
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>              Labels: sub-query
>         Attachments: HIVE-15812.1.patch
>
>
> Following query throws an exception
> {code:SQL}
> select sum(p_retailprice) from part group by p_type having sum(p_retailprice) > (select max(pp.p_retailprice) from part pp);
> {code}
> {noformat}
> SemanticException [Error 10004]: Line 3:40 Invalid table alias or column reference 'pp': (possible column names are: p_partkey, p_name, p_mfgr, p_brand, p_type, p_size, p_container, p_retailprice, p_comment)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)