You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "stream2000 (via GitHub)" <gi...@apache.org> on 2023/04/10 02:26:08 UTC

[GitHub] [hudi] stream2000 commented on a diff in pull request #8410: [HUDI-6050] Fix write helper deduplicate records lost origin data operation

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


##########
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:
   Why we compare the data between rec1 and rec2  here instead of comparing the reference between rec1 and reducedRecord just as what  FlinkWriteHelper do? 



-- 
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-unsubscribe@hudi.apache.org

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