jackye1995 commented on code in PR #6091:
URL: https://github.com/apache/iceberg/pull/6091#discussion_r1120756502


##########
core/src/main/java/org/apache/iceberg/ReachableFileUtil.java:
##########
@@ -137,9 +137,23 @@ public static List<String> manifestListLocations(Table 
table, Set<Long> snapshot
    * @return the location of statistics files
    */
   public static List<String> statisticsFilesLocations(Table table) {
+    return statisticsFilesLocations(table, null);
+  }
+
+  /**
+   * Returns locations of statistics files matching the given snapshotIds in a 
table.
+   *
+   * @param table table for which statistics files needs to be listed
+   * @param snapshotIds ids of snapshots for which statistics files will be 
returned. When null,
+   *     returns location of all the statistics files in a table.
+   * @return the location of statistics files
+   */
+  public static List<String> statisticsFilesLocations(Table table, Set<Long> 
snapshotIds) {

Review Comment:
   can we simplify the logic of the original method using stream()? Also for 
this method, I think we can provide a more generic util method that takes in a 
filter, instead of just adding a specific method to filter by snapshot ID set



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to