amrishlal commented on code in PR #8978:
URL: https://github.com/apache/hudi/pull/8978#discussion_r1245840481


##########
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/HoodieSparkRecordMerger.java:
##########
@@ -41,13 +42,30 @@ public Option<Pair<HoodieRecord, Schema>> 
merge(HoodieRecord older, Schema oldSc
     ValidationUtils.checkArgument(older.getRecordType() == 
HoodieRecordType.SPARK);
     ValidationUtils.checkArgument(newer.getRecordType() == 
HoodieRecordType.SPARK);
 
-    if (newer.getData() == null) {
-      // Delete record
-      return Option.empty();
+    if (newer instanceof HoodieSparkRecord) {
+      HoodieSparkRecord newSparkRecord = (HoodieSparkRecord) newer;
+      if (newSparkRecord.isDeleted()) {
+        // Delete record
+        return Option.empty();
+      }
+    } else {
+      if (newer.getData() == null) {

Review Comment:
   Not able to see this failure in the usual test cases (TestDelete, 
TestUpdate, TestDeleteFrom) that I am running locally for validating 
functionality. The failure might have been in one of the test cases that are 
run through github. I will revert the change to what I had earlier and see if 
build passes through github.



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