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


##########
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:
   @nsivabalan or @yihua do you know why this partitionFileNameList has to be 
sorted?



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to