Skip to content

Commit

Permalink
BugFix: PartitionStatsUtil#computeStats returns incomplete stats in c…
Browse files Browse the repository at this point in the history
…ase of partition evolution
  • Loading branch information
deniskuzZ committed Jan 30, 2025
1 parent 2a0d5e8 commit 1f893e6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
() -> new PartitionStats(key, specId));
if (entry.isLive()) {
stats.liveEntry(file, snapshot);
} else {
Expand Down

0 comments on commit 1f893e6

Please sign in to comment.