dhruvarya-db opened a new pull request, #2667: URL: https://github.com/apache/iceberg-rust/pull/2667
## Which issue does this PR close? Part of #2145. Extends #2591 (the `ExpireSnapshotsAction`) and #2664 (the `history.expire.*` defaults). ## What changes are included in this PR? When `ExpireSnapshotsAction` expires snapshots, it now also drops the statistics and partition-statistics metadata entries tied to each expired snapshot, mirroring Java `RemoveSnapshots` (`TableMetadata.Builder.removeSnapshots`, which calls `removeStatistics`/`removePartitionStatistics` for each removed snapshot). For every expired snapshot that has a statistics entry, `commit()` emits a `RemoveStatistics` update; likewise `RemovePartitionStatistics` for a partition-statistics entry. Only entries that actually exist produce an update, matching Java's behavior of recording a change only when an entry is present. This is metadata-only, consistent with the action so far. Physical deletion of the puffin files those entries point at is part of the file-cleanup maintenance operation (mirroring Java's `FileCleanupStrategy`), not this PR. ## Are these changes tested? Yes. New unit tests cover: an expired snapshot's statistics and partition-statistics entries are removed while a retained snapshot keeps its own; an expired snapshot with no statistics emits no removal; and only the statistics variant that is actually present is removed. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
