nsivabalan commented on code in PR #13830:
URL: https://github.com/apache/hudi/pull/13830#discussion_r2323052545
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -619,9 +621,10 @@ public static <R> HoodieData<HoodieRecord<R>>
tagGlobalLocationBackToRecords(
Option<HoodieRecordGlobalLocation> currentLocOpt =
Option.ofNullable(v.getRight().orElse(null));
if (currentLocOpt.isPresent()) {
HoodieRecordGlobalLocation currentLoc = currentLocOpt.get();
- boolean shouldDoMergedLookUpThenTag = mayContainDuplicateLookup
- || !Objects.equals(incomingRecord.getPartitionPath(),
currentLoc.getPartitionPath());
- if (shouldUpdatePartitionPath && shouldDoMergedLookUpThenTag) {
+ boolean shouldDoMergedLookUpThenTag = mayContainDuplicateLookup //
handle event time ordering updates
+ || shouldUpdatePartitionPath &&
!Objects.equals(incomingRecord.getPartitionPath(),
currentLoc.getPartitionPath()) // handle partition updates
+ || (!isCommitTimeOrdered &&
incomingRecord.isDelete(writerSchema.get(), properties)); // handle event time
ordering deletes
Review Comment:
I understand the simplicity it brings, but lets not add additional lookup
overhead for COW tables.
--
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]