jackye1995 commented on code in PR #6091:
URL: https://github.com/apache/iceberg/pull/6091#discussion_r1121263952
##########
core/src/main/java/org/apache/iceberg/ReachableFileUtil.java:
##########
@@ -137,11 +139,21 @@ public static List<String> manifestListLocations(Table
table, Set<Long> snapshot
* @return the location of statistics files
*/
public static List<String> statisticsFilesLocations(Table table) {
- List<String> statisticsFilesLocations = Lists.newArrayList();
- for (StatisticsFile statisticsFile : table.statisticsFiles()) {
- statisticsFilesLocations.add(statisticsFile.path());
- }
+ return statisticsFilesLocations(table, statisticsFile -> true);
+ }
- return statisticsFilesLocations;
+ /**
+ * Returns locations of statistics files for a table matching the given
predicate .
+ *
+ * @param table table for which statistics files needs to be listed
+ * @param predicate predicate for filtering the statistics files
+ * @return the location of statistics files
+ */
+ public static List<String> statisticsFilesLocations(
+ Table table, Predicate<StatisticsFile> predicate) {
Review Comment:
nit: is a newline required here after shorten the variable name?
--
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]