linliu-code commented on code in PR #12122:
URL: https://github.com/apache/hudi/pull/12122#discussion_r1819936930
##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/BaseHoodieMergedLogRecordScanner.java:
##########
@@ -217,11 +229,15 @@ protected void processNextDeletedRecord(DeleteRecord
deleteRecord) {
// Put the DELETE record
if (recordType == HoodieRecord.HoodieRecordType.AVRO) {
records.put((K) key, SpillableMapUtils.generateEmptyPayload(key,
- deleteRecord.getPartitionPath(), deleteRecord.getOrderingValue(),
getPayloadClassFQN()));
+ deleteRecord.getPartitionPath(), deleteOrderingVal,
getPayloadClassFQN()));
} else {
- HoodieEmptyRecord record = new HoodieEmptyRecord<>(new HoodieKey(key,
deleteRecord.getPartitionPath()), null, deleteRecord.getOrderingValue(),
recordType);
+ HoodieEmptyRecord record = new HoodieEmptyRecord<>(new HoodieKey(key,
deleteRecord.getPartitionPath()), null, deleteOrderingVal, recordType);
records.put((K) key, record);
}
+
+ if (deleteRecord.getOrderingValue() == null) {
+ records.get((K)
key).addMetadata(HoodieReaderContext.DELETE_FOUND_WITHOUT_ORDERING_VALUE,
"true");
+ }
Review Comment:
I think so since hoodie records can have natural ordering (though I don't
know when a user want to use natural order). especially true, when we want to
propagate this delete information through non-delete records.
--
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]