the-other-tim-brown commented on code in PR #13532:
URL: https://github.com/apache/hudi/pull/13532#discussion_r2193866902


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecordMergerFactory.java:
##########
@@ -287,9 +283,12 @@ public Option<BufferedRecord<T>> 
deltaMergeNonDeleteRecord(BufferedRecord<T> new
         if (combinedRecordData != existingRecord.getRecord()) {
           Pair<HoodieRecord, Schema> combinedRecordAndSchema = 
combinedRecordAndSchemaOpt.get();
           return 
Option.of(BufferedRecord.forRecordWithContext(combinedRecordData, 
combinedRecordAndSchema.getRight(), readerContext, orderingFieldName, false));
+        } else {
+          return Option.empty();
         }
       }
-      return Option.empty();
+      // An empty Option indicates that the output represents a delete.
+      return Option.of(new BufferedRecord<>(newRecord.getRecordKey(), 
newRecord.getOrderingValue(), null, null, true));

Review Comment:
   Good question, I am thinking `DEFAULT_ORDERING_VALUE` could make more sense 
since now that you mention it.  That ensures the next input is always selected 
as the output of the merge. @yihua any thoughts?



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