deniskuzZ commented on code in PR #12137:
URL: https://github.com/apache/iceberg/pull/12137#discussion_r1961671738


##########
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:
   hi @pvary, thanks for taking a look.
   `keyTemplate` is a unified tuple struct, so it can't be used. btw, if you 
grep iceberg code, you'll find a number of same 
[casts](https://github.com/apache/iceberg/blob/fad0c1e6c68fbc7e48b5b17c02ed9c26a2693afb/core/src/main/java/org/apache/iceberg/ManifestFilterManager.java#L566).



-- 
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

Reply via email to