-
Notifications
You must be signed in to change notification settings - Fork 2
feat(iceberg): introduce remove snapshot action (#21) #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
db988d4 to
a063986
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the remove snapshot action feature to the Iceberg library, enabling snapshot expiration and cleanup operations. The implementation adds functionality to expire snapshots based on age, retention count, and specific snapshot IDs.
- Adds
RemoveSnapshotActiontransaction action with configurable expiration policies - Implements snapshot retention logic based on branch references and age thresholds
- Provides integration tests for the new snapshot expiration functionality
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
crates/iceberg/src/transaction/remove_snapshots.rs |
Core implementation of the remove snapshots action with retention logic |
crates/iceberg/src/transaction/mod.rs |
Exposes the new action through the transaction API |
crates/iceberg/src/spec/table_metadata.rs |
Adds constants for snapshot expiration configuration |
crates/iceberg/src/spec/snapshot.rs |
Adds ancestor iteration utilities for snapshot traversal |
crates/integration_tests/tests/shared_tests/remove_snapshots_test.rs |
Integration test for the new functionality |
crates/integration_tests/tests/shared_tests/mod.rs |
Registers the new test module |
crates/integration_tests/Cargo.toml |
Adds chrono dependency for timestamp handling |
crates/integration_tests/tests/shared_tests/append_data_file_test.rs |
Fixes data file writer reuse issue |
crates/iceberg/testdata/table_metadata/TableMetadataV2ValidMultiSnapshot.json |
Test data with multiple snapshots |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
chenzl25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
* feat(iceberg): basic remove snapshot * feat(iceberg): introduce new properties for remove snapshots * feat(iceberg): support remove schemas * refactor(iceberg): refactor file org * address comments * refactor(iceberg): refactor and ut * fix(iceberg): fix integration-test typo fix: fix ut fix: fix test address comments address comments
16d4e35 to
3ce36e9
Compare
pick feat(iceberg): introduce remove snapshot action (#21)