danny0405 commented on code in PR #8410: URL: https://github.com/apache/hudi/pull/8410#discussion_r1169453515
########## 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(); + return reducedRecord.newInstance(reducedKey, operation); Review Comment: > for partial update payload scenarios, new payload constructed will include some values from old record and some from new incoming Yeah, so new object is returns and the decision for `==` always returns false, so this patch is kind of conservative and still keeps the `equals` comparison for the payload, but for Flink, we just use the object `==` directly. -- 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