wulei0302 commented on code in PR #5627:
URL: https://github.com/apache/hudi/pull/5627#discussion_r901564389


##########
hudi-client/hudi-java-client/src/main/java/org/apache/hudi/table/action/commit/JavaWriteHelper.java:
##########
@@ -65,11 +67,12 @@ public List<HoodieRecord<T>> deduplicateRecords(
 
     return keyedRecords.values().stream().map(x -> 
x.stream().map(Pair::getRight).reduce((rec1, rec2) -> {
       @SuppressWarnings("unchecked")
-      HoodieRecord reducedRec = rec2.preCombine(rec1);
+      HoodieRecord reducedRecord =  hoodieMerge.preCombine(rec1,rec2);
+
       // we cannot allow the user to change the key or partitionPath, since 
that will affect
       // everything
       // so pick it from one of the records.
-      return (HoodieRecord<T>) reducedRec.newInstance(rec1.getKey());
+      return (HoodieRecord<T>) new HoodieAvroRecord(reducedRecord);

Review Comment:
   done. 



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