Skip to content

Conversation

@shangxinli
Copy link
Contributor

Add the ExpireSnapshots interface for removing old snapshots from tables. This interface extends PendingUpdate directly and provides methods for:

  • ExpireSnapshotId: Expire specific snapshots by ID
  • ExpireOlderThan: Expire snapshots older than a timestamp
  • RetainLast: Keep N most recent snapshots
  • DeleteWith: Custom file deletion callback
  • CleanupLevel: Control cleanup scope (none, metadata only, or all)

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

Add the ExpireSnapshots interface for removing old snapshots from tables.
This interface extends PendingUpdate directly and provides methods for:

- ExpireSnapshotId: Expire specific snapshots by ID
- ExpireOlderThan: Expire snapshots older than a timestamp
- RetainLast: Keep N most recent snapshots
- DeleteWith: Custom file deletion callback
- CleanupLevel: Control cleanup scope (none, metadata only, or all)

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

wgtmac commented Nov 28, 2025

IMHO, we don't need to follow the Java design here to introduce pure interface which has only one concrete implementation. I have created #364 to track what's in my mind. Let me know what you think. Thanks!

@shangxinli shangxinli closed this Nov 28, 2025
@shangxinli shangxinli deleted the append_files branch November 28, 2025 21:52
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.

2 participants