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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/FileGroupReaderBasedMergeHandle.java:
##########
@@ -108,6 +118,42 @@ public FileGroupReaderBasedMergeHandle(HoodieWriteConfig 
config, String instantT
     } else {
       this.cdcLogger = Option.empty();
     }
+    this.recordIterator = null;
+    init(operation, this.partitionPath, fileSlice.getBaseFile());
+  }
+
+  /**
+   * FG reader based generic merge handle, which is not just for compaction.
+   */
+  public FileGroupReaderBasedMergeHandle(HoodieWriteConfig config, String 
instantTime, HoodieTable<T, I, K, O> hoodieTable,
+                                         Iterator<HoodieRecord<T>> recordItr, 
String partitionPath, String fileId,
+                                         TaskContextSupplier 
taskContextSupplier, Option<BaseKeyGenerator> keyGeneratorOpt,
+                                         HoodieReaderContext<T> readerContext, 
String maxInstantTime,
+                                         HoodieRecord.HoodieRecordType 
enginRecordType) {
+    super(config, instantTime, hoodieTable, recordItr, partitionPath, fileId, 
taskContextSupplier, keyGeneratorOpt);
+    this.maxInstantTime = maxInstantTime;

Review Comment:
   can we reuse code for constructors.



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