Expose table maintenance API (expire_snapshots, remove_orphan_files, drop_partition, trigger_compaction) for pypaimon_rust
- Dominant language
- Rust
- Stars
- 197
- Forks
- 92
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 91
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon-rust/issues) and found nothing similar.
### Motivation
Building on the catalog metadata and observability APIs (https://github.com/apache/paimon-rust/issues/284, https://github.com/apache/paimon-rust/issues/285), pypaimon_rust still has no support for table maintenance operations: snapshot expiration, orphan file cleanup, partition management, and compaction. In particular, `trigger_compaction` is essential for aggregation tables to produce correct merged results.
### Solution
Once the underlying rust maintenance functions are implemented, expose the following methods on PyTable:
```python
# PyTable (additions)
table.expire_snapshots(older_than_ms: int) -> int
table.remove_orphan_files(older_than_ms: int) -> list[str]
table.drop_partition(partition_spec: dict[str, str]) -> None
table.trigger_compaction(full: bool = False) -> None
```
### Anything else?
_No response_
### Willingness to contribute
- [x] I'm willing to submit a PR!
Contributor guide
Research direction
Start with PyTable's existing catalog metadata and observability APIs, then trace the underlying Rust maintenance functions. Implement and expose expire_snapshots, remove_orphan_files, drop_partition, and trigger_compaction with the documented arguments and return types, including full=False by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- data-engineering, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100