skyshineb commented on code in PR #12495:
URL: https://github.com/apache/hudi/pull/12495#discussion_r1889620980


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieInputFormatUtils.java:
##########
@@ -481,9 +481,14 @@ public static Map<HoodieTableMetaClient, List<Path>> 
groupSnapshotPathsByMetaCli
     Map<HoodieTableMetaClient, List<Path>> grouped = new HashMap<>();
     metaClientList.forEach(metaClient -> grouped.put(metaClient, new 
ArrayList<>()));
     for (Path path : snapshotPaths) {
+      String inputPathStr = path.toString();
       // Find meta client associated with the input path
-      metaClientList.stream().filter(metaClient -> 
path.toString().contains(metaClient.getBasePath().toString()))
-          .forEach(metaClient -> grouped.get(metaClient).add(path));
+      Option<HoodieTableMetaClient> matchedMetaClient = 
Option.fromJavaOptional(metaClientList.stream()
+          .filter(metaClient -> {
+            String basePathStr = metaClient.getBasePath().toString();
+            return inputPathStr.equals(basePathStr) || 
inputPathStr.startsWith(basePathStr + "/"); })

Review Comment:
   The `groupFileStatusForSnapshotPaths` is not used anywhere. In the 
[HUDI-3094](https://github.com/apache/hudi/pull/4417) the 
`HoodieParquetInputFormat.listStatus()` which was the caller of this method was 
removed and related logic was moved to `InputPathHandler` where it belongs now. 
So I deleted this method entirely.



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