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

Julian Hyde edited comment on CALCITE-1327 at 8/2/16 2:45 AM:
--------------------------------------------------------------

It's really all part of the same issue: making windowed aggregates (OVER) work 
in aggregate queries (those with GROUP BY, HAVING or non-OVER aggregates). I 
don't particularly mind whether it's a new JIRA case or just this one, but it 
all needs to be fixed.

Also, {{winSql("select count( * ) over () from emp group by deptno").ok();}} 
fails with {{AssertionError: star should have been expanded}}. I don't remember 
whether that has a JIRA case, but it's the same issue.


was (Author: julianhyde):
It's really all part of the same issue: making windowed aggregates (OVER) work 
in aggregate queries (those with GROUP BY, HAVING or non-OVER aggregates). I 
don't particularly mind whether it's a new JIRA case or just this one, but it 
all needs to be fixed.

Also, {{winSql("select count(*) over () from emp group by deptno").ok();}} 
fails with {{AssertionError: star should have been expanded}}. I don't remember 
whether that has a JIRA case, but it's the same issue.

> Nested aggregate windowed query fails
> -------------------------------------
>
>                 Key: CALCITE-1327
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1327
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Gautam Kumar Parai
>            Assignee: Gautam Kumar Parai
>
> Regression from CALCITE-750 Allow nested window aggregates. 
> Calcite allows illegal queries instead of raising an appropriate error. When 
> executing the following query calcite does not raise the following error.
> {code}
> select avg(sum(b)) over (partition by b) from t1;
> ERROR:  Expression 'b' is not being grouped
> {code}



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

Reply via email to