zhangyue19921010 commented on code in PR #13017:
URL: https://github.com/apache/hudi/pull/13017#discussion_r2014126022


##########
hudi-common/src/main/java/org/apache/hudi/common/util/hash/BucketIndexUtil.java:
##########
@@ -35,8 +35,8 @@ public class BucketIndexUtil {
    * @param parallelism Parallelism of the task
    * @return The partition index of this bucket.
    */
-  public static Functions.Function2<String, Integer, Integer> 
getPartitionIndexFunc(int bucketNum, int parallelism) {
-    return (partition, curBucket) -> {
+  public static Functions.Function3<Integer, String, Integer, Integer> 
getPartitionIndexFunc(int parallelism) {
+    return (bucketNum, partition, curBucket) -> {

Review Comment:
   Nice Question Here. 
   
   Based on our PRD exprience And talk with @xiarixiaoyao , Also new added UT 
testPartitionWithPartitionLevelBucketIndex. This Function3 still works good 
even `bucketNum does not equal among partitions`
   
   <img width="1528" alt="截屏2025-03-26 19 34 44" 
src="https://github.com/user-attachments/assets/8e6a66b4-6d7b-4a52-81bc-34abc70c9898";
 />
   
   



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