Description
running
drop table if exists tx1;
create table tx1 (a integer,b integer,c integer);
select sum(c),
grouping(b)
from tx1
group by rollup (b);
returns 0 rows; however
according to the standard:
The <empty grouping set> is regarded as the shortest such initial sublist. For example, “ROLLUP ( (A, B), (C, D) )”
is equivalent to “GROUPING SETS ( (A, B, C, D), (A, B), () )”.
so I think the totals row (the grouping for () should be present) - psql returns it.
Attachments
Attachments
Issue Links
- causes
-
HIVE-18413 Grouping of an empty result set may only contain null values
- Closed
-
HIVE-18523 Fix summary row in case there are no inputs
- Closed