Fix wrong results with empty grouping sets from an empty table
Details
| Detail name | Value |
|---|---|
| Changelog Number | 10991 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 7.1.0, Exasol 8.0.0 |
| Fix Versions | Exasol 8.25.0 |
| Resolution Date | 2024-02-15 |
Description
The empty grouping set “()” does not produce the expected "grand total" row when selecting from an empty table.
Example
The problem only happens for an empty table:
-- Setup create table A (A1 int);
The query should return one row but it returns no rows:
-- Expected: 1 row returned, values (0) -- Observed: 0 rows returned select count(*) from A group by grouping sets ((A1), ());
Workaround
There is no workaround.
Fix
The query produces the correct results.