morrySnow commented on code in PR #65880:
URL: https://github.com/apache/doris/pull/65880#discussion_r3655148961


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeRepeat.java:
##########
@@ -159,7 +160,8 @@ private static LogicalAggregate<Plan> 
normalizeRepeat(LogicalRepeat<Plan> repeat
         // rewrite grouping scalar function to virtual slots
         // rewrite the arguments of agg function to slots
         List<NamedExpression> normalizedAggOutput = Lists.newArrayList();
-        List<NamedExpression> groupingFunctions = Lists.newArrayList();
+        // use a map to deduplicate grouping scalar functions in projection
+        Map<GroupingScalarFunction, NamedExpression> groupingFunctions = 
Maps.newHashMap();

Review Comment:
   add test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to