-
Notifications
You must be signed in to change notification settings - Fork 34
feat: Add comprehensive snapshot expiration functionality for table maintenance #262
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
Open
ForeverAngry
wants to merge
34
commits into
JanKaul:main
Choose a base branch
from
ForeverAngry:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ented provide more context for unimplemented macro
…ented provide more context for unimplemented macro
…or-unimplemented Revert "provide more context for unimplemented macro"
use separate manifest files for delete files
fix: make version-hint.text compatible with other readers
fix clippy warnings
fix: conflict when projecting a field not present in equality deletes
fix: update `last-updated-ms` field when updating a table
fix: use correct number of splits for deletes
AppendSequenceGroups operation
docs: default compression level is 3
- Implemented snapshot expiration logic in the maintenance module. - Added methods for time-based and count-based snapshot retention. - Created examples demonstrating the usage of snapshot expiration. - Updated README with new features and examples. - Added integration tests for snapshot expiration functionality.
…erg-rust-spec APIs - Fix imports for SnapshotReference, SnapshotRetention, and SnapshotBuilder - Update create_test_snapshot to use correct builder pattern - Update create_test_ref to match current SnapshotReference structure - Remove unused imports from test file - All tests passing (9 unit tests + 6 integration tests)
- Resolved conflicts in Cargo.lock, datafusion_iceberg/Cargo.toml, manifest_list.rs, and transaction/operation.rs - Updated duckdb version to 1.4 in dev dependencies - Accepted upstream changes for files not modified by expire_snapshots feature
@JanKaul let me know what you think :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive(ish) (i think) snapshot expiration functionality to iceberg-rust, enabling automatic cleanup of old snapshots and associated files according to configurable retention policies.
Features Added
Core Functionality
ExpireSnapshots
builder with fluent configurationexpire_older_than
)retain_last
)API Example
Files Added/Modified
New Files
iceberg-rust/src/table/maintenance/
- New maintenance moduleiceberg-rust/src/table/maintenance/expire_snapshots.rs
- Core implementation (1,007 lines)iceberg-rust/examples/expire_snapshots.rs
- Usage examplesiceberg-rust/tests/snapshot_expiration.rs
- Comprehensive integration testsModified Files
iceberg-rust/src/table/mod.rs
- Addedexpire_snapshots()
method to Tableiceberg-rust/src/lib.rs
- Exposed maintenance moduleTesting
Comprehensive Test Coverage
Test Categories
Implementation Details
Documentation
readme.md
with the new features.Compatibility
This implementation provides a solid foundation for table maintenance operations in iceberg-rust, following Icebergs specification, and similar to that of the implementation from pyiceberg (that I also worked on 😮💨 ) in Rust!