yihua commented on code in PR #9519:
URL: https://github.com/apache/hudi/pull/9519#discussion_r1305960445


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandleWithChangeLog.java:
##########
@@ -103,7 +103,7 @@ protected void writeInsertRecord(HoodieRecord<T> newRecord) 
throws IOException {
     // TODO Remove these unnecessary newInstance invocations
     HoodieRecord<T> savedRecord = newRecord.newInstance();
     super.writeInsertRecord(newRecord);
-    if (!HoodieOperation.isDelete(newRecord.getOperation())) {
+    if (!HoodieOperation.isDelete(newRecord.getOperation()) && 
!savedRecord.isDelete(schema, config.getPayloadConfig().getProps())) {

Review Comment:
   Makes sense.  I'm wondering if other places using the same statement 
(`HoodieOperation.isDelete(newRecord.getOperation())`) should be updated too, 
e.g., in `writeUpdateRecord`.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandleWithChangeLog.java:
##########
@@ -103,7 +103,7 @@ protected void writeInsertRecord(HoodieRecord<T> newRecord) 
throws IOException {
     // TODO Remove these unnecessary newInstance invocations
     HoodieRecord<T> savedRecord = newRecord.newInstance();
     super.writeInsertRecord(newRecord);
-    if (!HoodieOperation.isDelete(newRecord.getOperation())) {
+    if (!HoodieOperation.isDelete(newRecord.getOperation()) && 
!savedRecord.isDelete(schema, config.getPayloadConfig().getProps())) {

Review Comment:
   Potential fixes to other places should be in a separate PR.



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