pvary commented on code in PR #12137: URL: https://github.com/apache/iceberg/pull/12137#discussion_r1961496435
########## core/src/main/java/org/apache/iceberg/PartitionStatsUtil.java: ########## @@ -96,7 +96,10 @@ private static PartitionMap<PartitionStats> collectStats( StructLike key = keyTemplate.copyFor(coercedPartition); Snapshot snapshot = table.snapshot(entry.snapshotId()); PartitionStats stats = - statsMap.computeIfAbsent(specId, key, () -> new PartitionStats(key, specId)); + statsMap.computeIfAbsent( + specId, + ((PartitionData) file.partition()).copy(), Review Comment: I'm a bit concerned about these casts. Could `keyTemplate.copyFor(file.partition())` work? -- 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