nsivabalan commented on code in PR #13830:
URL: https://github.com/apache/hudi/pull/13830#discussion_r2323053697


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/SparkMetadataTableRecordIndex.java:
##########
@@ -95,9 +96,10 @@ public <R> HoodieData<HoodieRecord<R>> 
tagLocation(HoodieData<HoodieRecord<R>> r
 
     HoodiePairData<String, HoodieRecordGlobalLocation> keyAndExistingLocations 
= lookupRecords(records, context, hoodieTable, fileGroupSize);
 
+    boolean mayContainDuplicateLookup = 
hoodieTable.getMetaClient().getTableType() == MERGE_ON_READ;
     // Tag the incoming records, as inserts or updates, by joining with 
existing record keys
     HoodieData<HoodieRecord<R>> taggedRecords = 
tagGlobalLocationBackToRecords(records, keyAndExistingLocations,
-        false, shouldUpdatePartitionPath(hoodieTable), config, hoodieTable);
+        mayContainDuplicateLookup, shouldUpdatePartitionPath(hoodieTable), 
config, hoodieTable);

Review Comment:
   sure. 



-- 
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]

Reply via email to