feat: Add Set Current Snapshot to ManageSnapshots API (#2871)

# Rationale for this change

This PR adds the ability to change the set the current snapshot of a
table. A bulk of this work was done in #758 but instead we have broken
it out to focus on the set snapshot logic first. Additionally I added a
few more tests, following the existing expire snapshots behavior.


## Are these changes tested?

Yes, added tests

## Are there any user-facing changes?

New API :)

```
table.manage_snapshots().set_current_snapshot(snapshot_id=123456789).commit()


table.manage_snapshots().set_current_snapshot(ref_name="my-tag").commit()

# chaining
table.manage_snapshots() \
      .create_tag(snapshot_id=older_id, tag_name="my-tag") \
      .set_current_snapshot(ref_name="my-tag") \
      .commit()

```

---------

Co-authored-by: Chinmay Bhat <12948588+chinmay-bhat@users.noreply.github.com>
4 files changed
tree: 40fd34d6638b8d641e166d877ffc922adefa8c1e
  1. .github/
  2. dev/
  3. mkdocs/
  4. pyiceberg/
  5. tests/
  6. vendor/
  7. .asf.yaml
  8. .codespellrc
  9. .gitignore
  10. .markdownlint.yaml
  11. .pre-commit-config.yaml
  12. LICENSE
  13. Makefile
  14. MANIFEST.in
  15. NOTICE
  16. pyproject.toml
  17. README.md
  18. ruff.toml
  19. setup.py
  20. uv.lock
README.md

Iceberg Python

PyIceberg is a Python library for programmatic access to Iceberg table metadata as well as to table data in Iceberg format. It is a Python implementation of the Iceberg table spec.

The documentation is available at https://py.iceberg.apache.org/.

Get in Touch