the-other-tim-brown commented on code in PR #9337:
URL: https://github.com/apache/hudi/pull/9337#discussion_r1283381296


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bloom/HoodieBloomIndex.java:
##########
@@ -214,12 +214,16 @@ protected List<Pair<String, BloomIndexFileInfo>> 
loadColumnRangesFromMetaIndex(
 
     String keyField = 
hoodieTable.getMetaClient().getTableConfig().getRecordKeyFieldProp();
 
+    List<Pair<String, HoodieBaseFile>> baseFilesForAllPartitions = 
HoodieIndexUtils.getLatestBaseFilesForAllPartitions(partitions, context, 
hoodieTable);
+    List<Pair<String, String>> partitionFileNameList = new 
ArrayList<>(baseFilesForAllPartitions.size());
+    Map<Pair<String, String>, String> partitionAndFileNameToFileId = new 
HashMap<>(baseFilesForAllPartitions.size());
+    baseFilesForAllPartitions.forEach(pair -> {
+      Pair<String, String> parititonAndFileName = Pair.of(pair.getKey(), 
pair.getValue().getFileName());
+      partitionFileNameList.add(parititonAndFileName);
+      partitionAndFileNameToFileId.put(parititonAndFileName, 
pair.getValue().getFileId());
+    });
     // Partition and file name pairs
-    List<Pair<String, String>> partitionFileNameList =
-        HoodieIndexUtils.getLatestBaseFilesForAllPartitions(partitions, 
context, hoodieTable).stream()
-            .map(partitionBaseFilePair -> 
Pair.of(partitionBaseFilePair.getLeft(), 
partitionBaseFilePair.getRight().getFileName()))
-            .sorted()
-            .collect(toList());
+    Collections.sort(partitionFileNameList); // TODO why does this need to be 
sorted?

Review Comment:
   Is there good testing around this? I can remove and make sure the tests 
still pass



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