linliu-code commented on code in PR #12122:
URL: https://github.com/apache/hudi/pull/12122#discussion_r1819852419
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergedReadHandle.java:
##########
@@ -166,6 +167,17 @@ private List<HoodieRecord<T>>
doMergedRead(Option<HoodieFileReader> baseFileRead
String key = record.getRecordKey();
if (deltaRecordMap.containsKey(key)) {
deltaRecordKeys.remove(key);
+
+ // When we find a processing time based delete, e.g., a delete
record without valid ordering value,
+ // or with default ordering value, i.e., 0, we can safely ignore
records before the delete record.
+ // That means, we can return the log record without merging with the
record from base file.
+ if
(deltaRecordMap.get(key).getMetaDataInfo(DELETE_FOUND_WITHOUT_ORDERING_VALUE).isPresent())
{
+ if (!deltaRecordMap.get(key).isDelete(readerSchema,
config.getProps())) {
+ mergedRecords.add(deltaRecordMap.get(key));
+ }
+ continue;
+ }
Review Comment:
I think in the end, we could incorporate this behavior in the default merger
logic. But I am not sure how complex it will be, and how many corner cases.
--
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]