gianm commented on code in PR #16326:
URL: https://github.com/apache/druid/pull/16326#discussion_r1941501077


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/groupby/GroupByQueryKit.java:
##########
@@ -148,7 +148,7 @@ public QueryDefinition makeQueryDefinition(
 
       partitionBoost = true;
     } else {
-      shuffleSpecFactoryPreAggregation = doLimitOrOffset
+      shuffleSpecFactoryPreAggregation = doLimitOrOffset || 
intermediateClusterBy.isEmpty()

Review Comment:
   The check for `intermediateClusterBy.isEmpty()` wasn't necessary before. 
It's here to ensure that in the no-dimensions case, all rows go to a single 
partition for the `GroupByPostShuffleFrameProcessor` stage. If we didn't do 
this, there could be multiple partitions for 
`GroupByPostShuffleFrameProcessor`, and each one would generate its own summary 
row. There could be duplicate summary rows in the final output.
   
   This wasn't a problem before, because no partitions would generate any 
results in this case.



-- 
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