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

Gabor Kaszab updated IMPALA-2792:
---------------------------------
    Labels: complextype nested_types planner ramp-up usability  (was: 
nested_types planner ramp-up usability)

> Syntactic sugar for computing aggregates over nested collections.
> -----------------------------------------------------------------
>
>                 Key: IMPALA-2792
>                 URL: https://issues.apache.org/jira/browse/IMPALA-2792
>             Project: IMPALA
>          Issue Type: New Feature
>          Components: Frontend
>    Affects Versions: Impala 2.3.0
>            Reporter: Alexander Behm
>            Priority: Major
>              Labels: complextype, nested_types, planner, ramp-up, usability
>
> For user convenience and SQL brevity, we should add syntax extensions to 
> concisely express aggregates over nested collections. Internally, we should 
> re-write the concise versions into the more verbose equivalent with a 
> correlated inline view.
> Example A:
> {code}
> New syntax:
> select count(c.orders) from customer c
> Internally rewrite to:
> select cnt from customer c, (select count(*) from c.orders) v
> {code}
> Example B:
> {code}
> New syntax:
> select avg(c.orders.items.price) from customer c
> Internally rewrite to:
> select a from customer c, (select avg(price) from c.orders.items) v
> {code}
> I suggest performing the rewrite inside StmtRewriter.java after rewriting all 
> subqueries from the WHERE clause.
> Similar syntactic improvements should be considered for analytic functions on 
> nested collections.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to