fix: preserve HMS table properties during commits (#2927)

<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change
HMS-specific table properties (e.g., `table_category` from data
contracts) were lost during PyIceberg commits because `commit_table()`
replaced all HMS parameters instead of merging them.

Fixes: #2926

## Are these changes tested?

Yes. Added `test_hive_preserves_hms_specific_properties()` that:
1. Sets HMS properties via Hive client (simulating external systems)
2. Performs PyIceberg commit
3. Verifies HMS properties are preserved

## Are there any user-facing changes?

Bug fix only - HMS properties set outside PyIceberg are now preserved
during commits. No API changes.

---------

Co-authored-by: Fokko Driesprong <fokko@apache.org>
2 files changed
tree: 8b608755c7bc3713a3efb5cd157dbadf107ee52c
  1. .github/
  2. dev/
  3. mkdocs/
  4. notebooks/
  5. pyiceberg/
  6. tests/
  7. vendor/
  8. .asf.yaml
  9. .codespellrc
  10. .gitignore
  11. .markdownlint.yaml
  12. .pre-commit-config.yaml
  13. LICENSE
  14. Makefile
  15. MANIFEST.in
  16. NOTICE
  17. pyproject.toml
  18. README.md
  19. ruff.toml
  20. setup.py
  21. 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