RussellSpitzer commented on code in PR #13327:
URL: https://github.com/apache/iceberg/pull/13327#discussion_r2180514471


##########
api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java:
##########
@@ -199,6 +201,16 @@ default RewriteDataFiles zOrder(String... columns) {
    */
   RewriteDataFiles filter(Expression expression);
 
+  /**
+   * A user-defined predicate for filtering out data files to include in the 
rewrite.
+   *
+   * @param predicate A predicate that returns true to include a file, false 
otherwise
+   * @return this for chaining
+   */
+  default RewriteDataFiles fileFilter(Predicate<DataFile> predicate) {

Review Comment:
   In general I think we are very cautious about allowing functional arguments 
to public APIs. I think it makes sense to add some additional filtering options 
but I'm wondering if they can be exposed in a different way? 
   
   For example couldn't we use an "expression" which touches a "file_location" 
as a metadata column to cover the use case specified in the description?
   
   I just want to make sure we really do have large enough number of use cases 
to validate opening up the interface here.



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