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/15 22:09:00 UTC

[jira] [Created] (CALCITE-731) Incorrect results from GROUPING SETS

Julian Hyde created CALCITE-731:
-----------------------------------

             Summary: Incorrect results from GROUPING SETS
                 Key: CALCITE-731
                 URL: https://issues.apache.org/jira/browse/CALCITE-731
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


Queries with GROUPING SETS do not seem to be returning grand totals. For example, using the schema of CALCITE-729, {noformat}> select grouping(deptno), deptno, loc from scott_clone.dept group by grouping sets (deptno), (loc);
+------------+--------+---------------+
|   EXPR$0   | DEPTNO |      LOC      |
+------------+--------+---------------+
| 1          | 10     | NEW YORK      |
| 1          | 30     | CHICAGO       |
| 1          | 40     | BOSTON        |
| 1          | 20     | DALLAS        |
+------------+--------+---------------+
4 rows selected (0.079 seconds){noformat}

There should be a row which gives the grand total for all DEPTNO values, and a row which gives the grand total for all LOC values.



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