danny0405 commented on code in PR #5590:
URL: https://github.com/apache/hudi/pull/5590#discussion_r873708869


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketIndexPartitioner.java:
##########
@@ -39,8 +40,9 @@ public BucketIndexPartitioner(int bucketNum, String 
indexKeyFields) {
   }
 
   @Override
-  public int partition(String key, int numPartitions) {
+  public int partition(HoodieKey key, int numPartitions) {
     int curBucket = BucketIdentifier.getBucketId(key, indexKeyFields, 
bucketNum);
-    return BucketIdentifier.mod(curBucket, numPartitions);
+    int globalHash = (key.getPartitionPath() + curBucket).hashCode();

Review Comment:
   Cool, thanks for the review :)



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