ajantha-bhat commented on code in PR #8502: URL: https://github.com/apache/iceberg/pull/8502#discussion_r1427926385
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -1288,6 +1307,24 @@ public Builder suppressHistoricalSnapshots() { return this; } + public Builder setPartitionStatistics(PartitionStatisticsFile partitionStatisticsFile) { + Preconditions.checkNotNull(partitionStatisticsFile, "partition statistics file is null"); + partitionStatisticsFiles.put( + partitionStatisticsFile.snapshotId(), ImmutableList.of(partitionStatisticsFile)); + changes.add(new MetadataUpdate.SetPartitionStatistics(partitionStatisticsFile)); + return this; + } + + public Builder removePartitionStatistics(long snapshotId) { + Preconditions.checkNotNull(snapshotId, "snapshotId is null"); Review Comment: True. I copy pasted from existing `removeStatistics` which has this problem. I overlooked or assumed things are correct. I will be careful next time. -- 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