[ 
https://issues.apache.org/jira/browse/CALCITE-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314692#comment-15314692
 ] 

Julian Hyde commented on CALCITE-750:
-------------------------------------

[~gparai], Much improved - thanks. I have done some cleanup at 
https://github.com/julianhyde/calcite/tree/750-win-agg-on-regular-agg, removing 
mutable state that made it difficult to understand what was going on. I'm 
working on further cleanup before I commit.

> Allow windowed aggregate on top of regular aggregate
> ----------------------------------------------------
>
>                 Key: CALCITE-750
>                 URL: https://issues.apache.org/jira/browse/CALCITE-750
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.3.0-incubating
>            Reporter: Aman Sinha
>            Assignee: Julian Hyde
>
> Window aggregate on top of a regular aggregate expression is a valid query 
> but currently fails with a 'aggregate expression cannot be nested'  error. 
> {code}
> SELECT avg(sum(sal)) over (partition by deptno) from emp group by deptno;
> SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Aggregate 
> expressions cannot be nested
> {code}
> We should allow one level nesting of aggregates under window aggregates, i.e. 
> {{window_agg(regular_agg(args)) over window}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to