jiangxt2 opened a new pull request, #14370: URL: https://github.com/apache/gravitino/pull/14370
### What changes were proposed in this pull request? Add partition-statistics listing, update, and drop operations to the Python table API, with typed ranges and batch inputs, request/response models, existing statistics serialization and exception mapping, and Python examples. ### Why are the changes needed? The server and Java client already support partition statistics, while Python applications need custom REST calls. These APIs let Python writing and maintenance workflows manage partition statistics through the SDK. Fixes #14338 ### Does this PR introduce _any_ user-facing change? Yes. Tables expose `supports_partition_statistics()` with `list_partition_statistics()`, `update_partition_statistics()`, and `drop_partition_statistics()`. `PartitionRange` supports unbounded, single-sided, and open/closed ranges. ### How was this patch tested? Python 3.10.18 and Corretto 17.0.18: all 1,281 Python unit tests passed without skips. From `clients/client-python` with project test dependencies installed: ```shell PYTHONPATH=. python scripts/generate_version.py PYTHONPATH=. python -m coverage run --branch -m unittest discover -s tests/unittests -t . ``` Installed-wheel integration: all 4 `TestRelationalTable` tests passed without skips against Gravitino 2.0.0-SNAPSHOT, Hive 0.1.13, and JDBC/H2 partition statistics storage. Coverage includes batch update/read-back, range boundaries and special names, partial/repeated drop/read-back, missing tables, invalid names, and existing partition/table-statistics regressions. For installed-package verification, run this selector from a separate directory containing only a copy of the `tests` package, with the wheel installed, `START_EXTERNAL_GRAVITINO=true`, `GRAVITINO_HOME` pointing at the running server distribution, and `GRAVITINO_CI_HIVE_DOCKER_IMAGE` selecting Hive 0.1.13. Keep the SDK source directory off `PYTHONPATH`: ```shell python -m unittest -v tests.integration.test_relational_table.TestRelationalTable ``` Ruff, Black, Pylint, Apache RAT (`./gradlew rat -PskipWeb=true` from the repository root), and the repository pre-commit hooks passed. -- 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]
