Skip to content

Conversation

@shangxinli
Copy link
Contributor

Add the ManageSnapshots interface for managing snapshots, branches, and tags in tables. This interface extends PendingUpdate directly and provides methods for:

Snapshot operations:

  • SetCurrentSnapshot: Roll back to specific snapshot
  • RollbackToTime: Roll back to snapshot before timestamp
  • RollbackTo: Roll back to ancestor snapshot
  • Cherrypick: Apply changes from orphan snapshot

Branch operations:

  • CreateBranch: Create new branch
  • RemoveBranch: Remove branch
  • RenameBranch: Rename branch
  • ReplaceBranch: Replace branch pointer
  • FastForwardBranch: Fast-forward branch

Tag operations:

  • CreateTag: Create new tag
  • RemoveTag: Remove tag
  • ReplaceTag: Replace tag pointer

Retention policies:

  • SetMinSnapshotsToKeep: Set minimum snapshots to retain
  • SetMaxSnapshotAgeMs: Set maximum snapshot age
  • SetMaxRefAgeMs: Set maximum reference age

The implementation includes comprehensive tests that verify behavior through the public API and follows the Java Iceberg API design.

Add the ManageSnapshots interface for managing snapshots, branches, and tags
in tables. This interface extends PendingUpdate directly and provides methods
for:

Snapshot operations:
- SetCurrentSnapshot: Roll back to specific snapshot
- RollbackToTime: Roll back to snapshot before timestamp
- RollbackTo: Roll back to ancestor snapshot
- Cherrypick: Apply changes from orphan snapshot

Branch operations:
- CreateBranch: Create new branch
- RemoveBranch: Remove branch
- RenameBranch: Rename branch
- ReplaceBranch: Replace branch pointer
- FastForwardBranch: Fast-forward branch

Tag operations:
- CreateTag: Create new tag
- RemoveTag: Remove tag
- ReplaceTag: Replace tag pointer

Retention policies:
- SetMinSnapshotsToKeep: Set minimum snapshots to retain
- SetMaxSnapshotAgeMs: Set maximum snapshot age
- SetMaxRefAgeMs: Set maximum reference age

The implementation includes comprehensive tests that verify behavior through
the public API and follows the Java Iceberg API design.
@shangxinli
Copy link
Contributor Author

Will change it later according to #364

@shangxinli shangxinli closed this Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant