cshuo commented on code in PR #13532:
URL: https://github.com/apache/hudi/pull/13532#discussion_r2193860983
##########
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:
Is it correct to use `newRecord.getOrderingValue()`, or should we use
`DEFAULT_ORDERING_VALUE` (0)?
--
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]