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

[jira] [Updated] (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 ]

ASF GitHub Bot updated HIVE-15757:
----------------------------------
    Labels: pull-request-available sub-query  (was: sub-query)

> 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: pull-request-available, sub-query
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)