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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieWriteHelper.java:
##########
@@ -78,7 +79,8 @@ protected HoodieData<HoodieRecord<T>> doDeduplicateRecords(
         throw new HoodieException(String.format("Error to merge two records, 
%s, %s", rec1, rec2), e);
       }
       HoodieKey reducedKey = rec1.getData().equals(reducedRecord.getData()) ? 
rec1.getKey() : rec2.getKey();
-      return reducedRecord.newInstance(reducedKey);
+      HoodieOperation operation = 
rec1.getData().equals(reducedRecord.getData()) ? rec1.getOperation() : 
rec2.getOperation();

Review Comment:
   There is a risk here because not all payload mergers conform the rules, for 
e.g. the `PartialUpdateAvroPayload` actually returns a new object each time, 
the tricky part is the operation does not affect because all the operations 
should be upsert for partial update scenarios.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to