pvary commented on code in PR #8803: URL: https://github.com/apache/iceberg/pull/8803#discussion_r1392385312
########## core/src/main/java/org/apache/iceberg/GenericDataFile.java: ########## @@ -66,23 +67,31 @@ class GenericDataFile extends BaseFile<DataFile> implements DataFile { * Copy constructor. * * @param toCopy a generic data file to copy. - * @param fullCopy whether to copy all fields or to drop column-level stats + * @param copyStats whether to copy all fields or to drop column-level stats. + * @param requestedColumnIds column ids for which to keep stats. If <code>null</code> then every + * column stat is kept. */ - private GenericDataFile(GenericDataFile toCopy, boolean fullCopy) { - super(toCopy, fullCopy); + private GenericDataFile( + GenericDataFile toCopy, boolean copyStats, Set<Integer> requestedColumnIds) { + super(toCopy, copyStats, requestedColumnIds); } /** Constructor for Java serialization. */ GenericDataFile() {} @Override public DataFile copyWithoutStats() { - return new GenericDataFile(this, false /* drop stats */); + return new GenericDataFile(this, false /* drop stats */, null); + } + + @Override + public DataFile copyWithStats(Set<Integer> requestedColumnIds) { + return new GenericDataFile(this, true, requestedColumnIds); } @Override public DataFile copy() { - return new GenericDataFile(this, true /* full copy */); + return new GenericDataFile(this, true /* full copy */, null); Review Comment: I think this usage is straightforward, and adding a new constructor would not help too much. So I did not apply this change -- 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