zhuxiangyi opened a new pull request, #967:
URL: https://github.com/apache/paimon-rust/pull/967
### Purpose
Linked issue: #964 (part 3 of 4)
> Stacked on #965. Only the last commit, "feat(python): expose
Table.expire_snapshots", is new
> here.
Expose snapshot expiration from #965 to Python.
### Brief change log
- `Table.expire_snapshots(retain_max=None, retain_min=None,
older_than_ms=None, max_deletes=None)
-> int` in the Python binding. Unset arguments fall back to the table
options, as in `CALL
sys.expire_snapshots`. The call releases the GIL while it runs and returns
the number of expired
snapshots.
- Type stub and docstring in `datafusion.pyi`.
### Tests
- `tests/test_table.py::test_expire_snapshots` covers:
- the defaults keep recent snapshots;
- `retain_max` / `retain_min`;
- `older_than_ms` with `max_deletes`;
- the latest data and a tagged snapshot stay readable;
- invalid retention raises `ValueError`.
- `make install && make test` for `tests/test_table.py` passes (24 tests),
and so does clippy with
`-D warnings`.
### API and Format
New Python method `Table.expire_snapshots`. No format change.
### Documentation
Docstring in the type stub.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]