You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/08/16 05:50:45 UTC

[jira] [Updated] (CALCITE-847) Avg window function used along with Group-By leads to AssertionError

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

Sean Hsuan-Yi Chu updated CALCITE-847:
--------------------------------------
    Summary: Avg window function used along with Group-By leads to AssertionError  (was: Using both Avg aggregate function and Avg window function leads to AssertionError)

> Avg window function used along with Group-By leads to AssertionError
> --------------------------------------------------------------------
>
>                 Key: CALCITE-847
>                 URL: https://issues.apache.org/jira/browse/CALCITE-847
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> For example, 
> {code}
> select avg(deptno), avg(deptno) over ()
> from emp
> group by deptno
> {code}
> gives 
> {code}
> java.lang.AssertionError: Internal error: while converting SUM(`EMP`.`DEPTNO`) / COUNT(`EMP`.`DEPTNO`)
> 	at org.apache.calcite.util.Util.newInternal(Util.java:792)
> 	at org.apache.calcite.sql2rel.ReflectiveConvertletTable$1.convertCall(ReflectiveConvertletTable.java:96)
> 	at org.apache.calcite.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:60)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4116)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:3566)
> 	at org.apache.calcite.sql.SqlCall.accept(SqlCall.java:130)
> {code}
> (Below is truncated.)



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