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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieWriteHelper.java:
##########
@@ -58,10 +58,8 @@ public HoodieData<HoodieRecord<T>> deduplicateRecords(
       return Pair.of(key, record);
     }).reduceByKey((rec1, rec2) -> {
       @SuppressWarnings("unchecked")
-      HoodieRecord reducedRec = rec2.preCombine(rec1);
-      HoodieKey reducedKey = rec1.getData().equals(reducedRec) ? rec1.getKey() 
: rec2.getKey();
-
-      return (HoodieRecord<T>) reducedRec.newInstance(reducedKey);
+      HoodieRecord<T> reducedRecord =  hoodieMerge.preCombine(rec1, rec2);
+      return reducedRecord.newInstance();

Review Comment:
   Sorry, now should directly return to reducedRecord



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