danny0405 commented on code in PR #13830:
URL: https://github.com/apache/hudi/pull/13830#discussion_r2320675744
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -620,8 +619,10 @@ public static <R> HoodieData<HoodieRecord<R>>
tagGlobalLocationBackToRecords(
if (currentLocOpt.isPresent()) {
HoodieRecordGlobalLocation currentLoc = currentLocOpt.get();
boolean shouldDoMergedLookUpThenTag = mayContainDuplicateLookup
- || !Objects.equals(incomingRecord.getPartitionPath(),
currentLoc.getPartitionPath());
- if (shouldUpdatePartitionPath && shouldDoMergedLookUpThenTag) {
+ || !Objects.equals(incomingRecord.getPartitionPath(),
currentLoc.getPartitionPath())
+ // if the ordering is not simply based on commit time and the
incoming record is a delete, the value needs to be compared to the existing
value before deleting the key from the index
+ || (!isCommitTimeOrdered &&
incomingRecord.isDelete(writerSchema.get(), properties));
+ if ((shouldUpdatePartitionPath || isMoRTable) &&
shouldDoMergedLookUpThenTag) {
Review Comment:
Not sure why MOR is specially handled here for RLI index, but it seems not
right for the other two indecies: `global simple` and `global bloom`, for these
two, when table is MOR, the flag `mayContainDuplicateLookup` is always true,
then `shouldDoMergedLookUpThenTag` is also true, so the check
`shouldUpdatePartitionPath` become invalid anymore.
--
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]