stream2000 commented on code in PR #9957:
URL: https://github.com/apache/hudi/pull/9957#discussion_r1377126517


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/strategy/PartitionAwareClusteringPlanStrategy.java:
##########
@@ -79,6 +79,11 @@ protected Stream<HoodieClusteringGroup> 
buildClusteringGroupsForPartition(String
         fileSliceGroups.add(Pair.of(currentGroup, numOutputGroups));
         currentGroup = new ArrayList<>();
         totalSizeSoFar = 0;
+
+        // if fileSliceGroups's size reach the max group, stop loop
+        if (fileSliceGroups.size() >= writeConfig.getClusteringMaxNumGroups()) 
{

Review Comment:
   Looks reasonable, can we add a test in 
`TestSparkBuildClusteringGroupsForPartition` to test this early stopping 
improvement? 



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

Reply via email to