Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.30.0
-
jdk8
Description
GROUP BY DISTINCT will be used to remove duplicate GROUPING SETS, for example:
SELECT product_id, product_class_id, count(*) from product GROUP BY DISTINCT CUBE (product_id, product_class_id), ROLLUP (product_id, product_class_id)
it's equivalent to
SELECT product_id, product_class_id, count(*) from product GROUP BY GROUPING SETS ((product_id, product_class_id), (product_id), (product_class_id), ())
GROUP BY ALL will remain the duplicate GROUPING SETS, it's equivalent to GROUP BY, so most databases use ALL as the default set quantifier.
As far as I know the PostgreSQL and Trino support this syntax.