[
https://issues.apache.org/jira/browse/HIVE-16330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ashutosh Chauhan resolved HIVE-16330.
-------------------------------------
Resolution: Fixed
Sorry for breakage. Pushed again!
> Improve plans for scalar subquery with aggregates
> -------------------------------------------------
>
> Key: HIVE-16330
> URL: https://issues.apache.org/jira/browse/HIVE-16330
> Project: Hive
> Issue Type: Sub-task
> Reporter: Vineet Garg
> Assignee: Vineet Garg
> Fix For: 3.0.0
>
> Attachments: HIVE-16330.1.patch, HIVE-16330.2.patch,
> HIVE-16330.3.patch
>
>
> Scalar subquery plans are generated with a count(*) on subquery which is fed
> to {{sq_count_check}} UDF. This is to make sure at runtime that there is at
> most one row generated by scalar subquery.
> We can avoid generating this extra count(*) for scalar subqueries with
> aggregates and windowing since such queries are guaranteed to generate at
> most one row. e.g. {code:SQL} select * from part where p_size > (select
> max(p_size) from part) {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)