From 1506f9933946b48f4c4cfe03b8613a3ed382a57d Mon Sep 17 00:00:00 2001 From: Karol Sobczak Date: Tue, 20 Sep 2022 13:06:28 +0200 Subject: [PATCH] Fix javadoc in OptimizeMixedDistinctAggregations Javadoc seems to indicate there are three GROUP BY involved. However, there are only two GROUP BYs and GroupId operator. --- .../optimizations/OptimizeMixedDistinctAggregations.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java index 35a0d08492c1..51da3479c520 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/OptimizeMixedDistinctAggregations.java @@ -69,7 +69,8 @@ * * SELECT a1, a2,..., an, arbitrary(if(group = 0, f1)),...., arbitrary(if(group = 0, fm)), F(if(group = 1, c)) FROM * SELECT a1, a2,..., an, F1(b1) as f1, F2(b2) as f2,...., Fm(bm) as fm, c, group FROM - * SELECT a1, a2,..., an, b1, b2, ... ,bn, c FROM Table GROUP BY GROUPING SETS ((a1, a2,..., an, b1, b2, ... ,bn), (a1, a2,..., an, c)) + * GroupIdNode ((a1, a2,..., an, b1, b2, ... ,bn), (a1, a2,..., an, c)) + * SELECT a1, a2,..., an, b1, b2, ... ,bn, c FROM Table * GROUP BY a1, a2,..., an, c, group * GROUP BY a1, a2,..., an */