KnightChess commented on code in PR #11256:
URL: https://github.com/apache/hudi/pull/11256#discussion_r1606265774


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -288,12 +288,9 @@ public static <R> HoodieData<HoodieRecord<R>> 
mergeForPartitionUpdatesIfNeeded(
     // the tagging partitions and locations
     // NOTE: The incoming records may only differ in record position, however, 
for the purpose of
     //       merging in case of partition updates, it is safe to ignore the 
record positions.
-    HoodieData<HoodieRecordGlobalLocation> globalLocations = 
incomingRecordsAndLocations
+    HoodieData<Pair<String, String>> globalLocations = 
incomingRecordsAndLocations
         .filter(p -> p.getRight().isPresent())
-        .map(p -> new HoodieRecordGlobalLocation(
-            p.getRight().get().getPartitionPath(),
-            p.getRight().get().getInstantTime(),
-            p.getRight().get().getFileId()))
+        .map(p -> Pair.of(p.getRight().get().getPartitionPath(), 
p.getRight().get().getFileId()))

Review Comment:
   LGTM, but can I ask a question. look like the `instantime` is different with 
the same fgId in `HoodieRecordGlobalLocation`, is this normal? In `Global 
Simple`, it will use base file commit time as `InstantTime`, and there is no 
different timestamp in the same file. So there is a problem here, 
`HoodieRecordLocation's instantTime` is baseFile lastCommit time which file 
name contain, or every record commit time? or may be use any of them, there 
will be no problem.



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