You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Gautam Kumar Parai (JIRA)" <ji...@apache.org> on 2016/08/05 21:56:20 UTC

[jira] [Commented] (CALCITE-1346) Invalid nested window aggregate query with alias

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

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

This case was missed in CALCITE-1327, CALCITE-1340. The scope is not considered AggregatingScope because we do not find nested window aggregates. Only the top-level select list items are considered for the OVER clause. Instead, we should use the overFinder since the OVER clause will not occur in the top level as in the example above. 

> Invalid nested window aggregate query with alias
> ------------------------------------------------
>
>                 Key: CALCITE-1346
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1346
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Gautam Kumar Parai
>            Assignee: Gautam Kumar Parai
>
> The following query should fail but does not!
> {code}
> SELECT max(sum(sal)) OVER (partition by deptno) AS maxSal
> FROM emp
> WHERE deptno > 10;
> {code}



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