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

Gautam Kumar Parai commented on CALCITE-1340:
---------------------------------------------

It was a typo. Thanks for noticing it Zelaine!

> Window aggregates invalid error/error messages in some cases
> ------------------------------------------------------------
>
>                 Key: CALCITE-1340
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1340
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Gautam Kumar Parai
>            Assignee: Gautam Kumar Parai
>
> Queries which fail (or fail with inconsistent errors)
> Q1:
> {code}select count( * ) over () from emp group by deptno 
> AssertionError: star should have been expanded.
> {code}
> Q2:
> {code}
> SELECT sum(empno), max(empno) OVER (order by deptno) 
> FROM emp 
> GROUP BY empno 
> gives error: Expression 'DEPTNO' is not being grouped
> SELECT sum(empno), max(empno) OVER w 
> FROM emp 
> GROUP BY empno 
> WINDOW w as (order by deptno)
> gives no error:
> {code}
> Q3:
> {code}
> select cume_dist() over w , rank() 
> from emp 
> window w as (partition by deptno order by deptno)
> Assertion Error: Expression 'DEPTNO' is not being grouped
> instead of 
> Assertion Error: OVER clause is necessary for window functions
> {code}



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

Reply via email to