Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-729

IndexOutOfBoundsException in ROLLUP query on JDBC data source

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      IndexOutOfBoundsException in ROLLUP query.

      > 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)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: