fhan688 commented on code in PR #18897:
URL: https://github.com/apache/hudi/pull/18897#discussion_r3360657211


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bucket/BucketStreamWriteFunction.java:
##########
@@ -107,6 +114,11 @@ public void open(Configuration parameters) throws 
IOException {
     this.isInsertOverwrite = OptionsResolver.isInsertOverwrite(config);
     this.numBucketsFunction = new 
NumBucketsFunction(config.get(FlinkOptions.BUCKET_INDEX_PARTITION_EXPRESSIONS),
         config.get(FlinkOptions.BUCKET_INDEX_PARTITION_RULE), 
config.get(FlinkOptions.BUCKET_INDEX_NUM_BUCKETS));
+    this.isRemotePartitionerEnabled = 
OptionsResolver.shouldUseBucketRemotePartitioner(config);

Review Comment:
   > inline `isRemotePartitionerEnabled` and check whether 
`remotePartitionHelper` is null where needed.
   
   Done. I removed the separate `isRemotePartitionerEnabled` flag and now use 
`remotePartitionHelper != null` as the single source of truth. This avoids 
keeping two pieces of state for the same condition while preserving the same 
behavior.



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