pvary commented on code in PR #8803: URL: https://github.com/apache/iceberg/pull/8803#discussion_r1365195690
########## api/src/main/java/org/apache/iceberg/ContentFile.java: ########## @@ -177,4 +191,26 @@ default Long fileSequenceNumber() { default F copy(boolean withStats) { return withStats ? copy() : copyWithoutStats(); } + + /** + * Copies this file (potentially with or without specific column stats). Manifest readers can + * reuse file instances; use this method to copy data when collecting files from tasks. + * + * @param withStats Will copy this file without file stats if set to <code>false</code>. + * @param statsToKeep Will keep stats only for these columns. Not used if <code>withStats</code> + * is set to <code>false</code>. + * @return a copy of this data file. If "withStats" is set to <code>false</code> the file will not + * contain lower bounds, upper bounds, value counts, null value counts, or nan value counts. + * If "withStats" is set to <code>true</code> and the "statsToKeep" is not empty then only + * specific column stats will be kept. + */ + default F copy(boolean withStats, Collection<Integer> statsToKeep) { Review Comment: Done -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org