Julian Hyde created CALCITE-729:
-----------------------------------
Summary: 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
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)