dhruvarya-db opened a new pull request, #2591: URL: https://github.com/apache/iceberg-rust/pull/2591
## Which issue does this PR close? Revives the effort to close #2145 (originally filed as #1454), which has been attempted before but never landed. This is the first of a small series of PRs and covers the metadata-only piece; physical file cleanup will build on top of it in follow-ups. ## What changes are included in this PR? Adds an `ExpireSnapshotsAction` to the transaction API, reachable as `tx.expire_snapshots()` and following the same convention as the other actions. It selects the snapshots to expire — either an explicit set of ids, or everything older than a timestamp while always keeping the most recent `retain_last` snapshots — and emits a single `RemoveSnapshots` update. The current snapshot is never expired. Selection reuses the existing `TableMetadataBuilder::remove_snapshots` logic, which already prunes dangling refs and rewrites the snapshot log, so the action only has to decide which ids to remove. It deliberately does not touch any files; that is left to a follow-up so this change stays small and easy to review. ## Are these changes tested? Yes. Unit tests cover explicit-id expiry, current-snapshot protection, the `retain_last` default and no-op cases, age filtering, unknown ids being ignored, and that the action registers on a transaction. -- 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]
