Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
None
-
None
-
None
Description
Queries with GROUPING SETS do not seem to be returning grand totals. For example, using the schema of CALCITE-729,
> 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)
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.