You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Krisztian Kasa (Jira)" <ji...@apache.org> on 2021/03/05 14:10:00 UTC

[jira] [Assigned] (HIVE-15757) Allow EXISTS/NOT EXISTS correlated subquery with aggregates

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

Krisztian Kasa reassigned HIVE-15757:
-------------------------------------

    Assignee: Krisztian Kasa  (was: Vineet Garg)

> Allow EXISTS/NOT EXISTS correlated subquery with aggregates
> -----------------------------------------------------------
>
>                 Key: HIVE-15757
>                 URL: https://issues.apache.org/jira/browse/HIVE-15757
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: sub-query
>
> Currently HIVE doesn't allow correlated EXISTS/NOT EXISTS subqueries which has aggregate without group by e.g.
> {code} select *
> from src b 
> where exists 
>   (select count(*) 
>   from src a 
>   where b.value = a.value  and a.key = b.key and a.value > 'val_9'
>   ) ;
> {code}
> Such queries could be rewritten to replace EXISTS/NOT EXISTS predicate with {{true}} or {{false}} based on aggregate.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)