You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
With grouping sets, it's possible that some of the grouping sets areduplicate. This is especially common with CUBE and ROLLUP clauses. Forexample GROUP BY CUBE (a,b), CUBE (b,c) is equivalent to GROUP BY GROUPING SETS ( (a, b, c), (a, b, c), (a, b, c), (a, b), (a, b), (a, b), (a), (a), (a), (c, a), (c, a), (c, a), (c), (b, c), (b), () )Some of the grouping sets are calculated multiple times, which is mostlyunnecessary. This commit implements a new GROUP BY DISTINCT feature, asdefined in the SQL standard, which eliminates the duplicate sets.Author: Vik FearingReviewed-by: Erik Rijkers, Georgios Kokolatos, Tomas VondraDiscussion:https://postgr.es/m/bf3805a8-d7d1-ae61-fece-761b7ff41ecc@postgresfriends.org