nastra commented on code in PR #12226: URL: https://github.com/apache/iceberg/pull/12226#discussion_r2000801634
########## core/src/main/java/org/apache/iceberg/PartitionStats.java: ########## @@ -150,7 +158,12 @@ public void appendStats(PartitionStats entry) { this.positionDeleteFileCount += entry.positionDeleteFileCount; this.equalityDeleteRecordCount += entry.equalityDeleteRecordCount; this.equalityDeleteFileCount += entry.equalityDeleteFileCount; - this.totalRecordCount += entry.totalRecordCount; + + if (totalRecordCount == null) { + this.totalRecordCount = entry.totalRecordCount; + } else { + this.totalRecordCount += entry.totalRecordCount; Review Comment: I feel like there should be some tests where `totalRecordCount` is null/non-null to make sure this is all properly handled -- 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