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


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java:
##########
@@ -200,6 +203,18 @@ protected Dataset<FileInfo> manifestListDS(Table table, 
Set<Long> snapshotIds) {
     return toFileInfoDS(manifestLists, MANIFEST_LIST);
   }
 
+  protected Dataset<FileInfo> statisticsFileDS(Table table, Set<Long> 
snapshotIds) {
+    Predicate<StatisticsFile> predicate;
+    if (snapshotIds == null) {
+      predicate = statisticsFile -> true;
+    } else {
+      predicate = statisticsFile -> 
snapshotIds.contains(statisticsFile.snapshotId());
+    }
+
+    return toFileInfoDS(
+        ReachableFileUtil.statisticsFilesLocations(table, predicate), 
STATISTICS_FILES);

Review Comment:
   nit: Can we define an extra var with a relatively short name like 
`statisticsFiles` or `locations` so that this would fit on one line?



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