linliu-code commented on code in PR #13580:
URL: https://github.com/apache/hudi/pull/13580#discussion_r2225572337


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -387,8 +389,16 @@ public Iterator<List<WriteStatus>> handleUpdate(String 
partitionPath, String fil
   }
 
   protected HoodieMergeHandle getUpdateHandle(String partitionPath, String 
fileId, Iterator<HoodieRecord<T>> recordItr) {
-    HoodieMergeHandle mergeHandle = 
HoodieMergeHandleFactory.create(operationType, config, instantTime, table, 
recordItr, partitionPath, fileId,
-        taskContextSupplier, keyGeneratorOpt);
+    HoodieMergeHandle mergeHandle;
+    if 
(config.getMergeHandleClassName().equals(FileGroupReaderBasedMergeHandle.class.getName()))
 {
+      HoodieReaderContext<T> readerContext = 
table.getContext().<T>getReaderContextFactory(table.getMetaClient()).getContext();
+      mergeHandle = HoodieMergeHandleFactory.create(
+          operationType, config, instantTime, table, recordItr, partitionPath, 
fileId, taskContextSupplier, keyGeneratorOpt,
+          readerContext, HoodieRecord.HoodieRecordType.SPARK);

Review Comment:
   Right.



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