hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <>
Subject [jira] [Updated] (HIVE-16330) Improve plans for scalar subquery with aggregates
Date Tue, 09 May 2017 23:34:04 GMT


Vineet Garg updated HIVE-16330:
    Status: Open  (was: Patch Available)

> Improve plans for scalar subquery with aggregates
> -------------------------------------------------
>                 Key: HIVE-16330
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>         Attachments: HIVE-16330.1.patch, HIVE-16330.2.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

View raw message