You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/05/17 08:14:59 UTC

[jira] [Resolved] (CALCITE-729) IndexOutOfBoundsException in ROLLUP query on JDBC data source

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

Julian Hyde resolved CALCITE-729.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.3.0-incubating

Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/bf423761.

This fix prevents us pushing down GROUPING SETS. I've added CALCITE-734 to push them down if the provider supports the syntax.

> IndexOutOfBoundsException in ROLLUP query on JDBC data source
> -------------------------------------------------------------
>
>                 Key: CALCITE-729
>                 URL: https://issues.apache.org/jira/browse/CALCITE-729
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>             Fix For: 1.3.0-incubating
>
>
> IndexOutOfBoundsException in ROLLUP query. 
> {noformat}> select grouping(deptno), deptno, grouping(job), job, count(*) as c from "scott".emp group by rollup (deptno, job);
> Error: error while executing SQL "select grouping(deptno), deptno, grouping(job), job, count(*) as c from "scott".emp group by rollup (deptno, job)": Index: 3, Size: 3 (state=,code=0)
> java.sql.SQLException: error while executing SQL "select grouping(deptno), deptno, grouping(job), job, count(*) as c from "scott".emp group by rollup (deptno, job)": Index: 3, Size: 3
> 	at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
> 	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:112)
> 	at org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:121)
> 	at sqlline.Commands.execute(Commands.java:822)
> 	at sqlline.Commands.sql(Commands.java:732)
> 	at sqlline.SqlLine.dispatch(SqlLine.java:807)
> 	at sqlline.SqlLine.begin(SqlLine.java:681)
> 	at sqlline.SqlLine.start(SqlLine.java:398)
> 	at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
> 	at java.util.ArrayList.get(ArrayList.java:411)
> 	at org.apache.calcite.sql.SqlNodeList.get(SqlNodeList.java:92)
> 	at org.apache.calcite.adapter.jdbc.JdbcImplementor$Result$1.field(JdbcImplementor.java:416){noformat}



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