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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java:
##########
@@ -139,15 +138,30 @@ public HoodieMergeHandle(HoodieWriteConfig config, String 
instantTime, HoodieTab
     this.keyToNewRecords = keyToNewRecords;
     this.useWriterSchemaForCompaction = true;
     this.preserveMetadata = 
config.isPreserveHoodieCommitMetadataForCompaction();
-    init(fileId, this.partitionPath, dataFileToBeMerged);
-    validateAndSetAndKeyGenProps(keyGeneratorOpt, config.populateMetaFields());
+    init(null, dataFileToBeMerged, keyGeneratorOpt);
   }
 
   private void validateAndSetAndKeyGenProps(Option<BaseKeyGenerator> 
keyGeneratorOpt, boolean populateMetaFields) {
     ValidationUtils.checkArgument(populateMetaFields == 
!keyGeneratorOpt.isPresent());
     this.keyGeneratorOpt = keyGeneratorOpt;
   }
 
+  private void init(Iterator<HoodieRecord<T>> recordItr, HoodieBaseFile 
baseFile, Option<BaseKeyGenerator> keyGeneratorOpt) {
+    if (recordItr != null) {

Review Comment:
   Can we revert this method `init` ? I don't think it makes much sense to wrap 
as a new method here. The different #init methods do totally different things 
here.



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