JingsongLi opened a new pull request, #1141:
URL: https://github.com/apache/paimon-rust/pull/1141

   ## Purpose
   
   PyPaimon already supports REST branch creation, listing, deletion and 
fast-forward. Rust has filesystem branch helpers but lacks these operations on 
`Catalog`, `RESTApi`, and the native Python catalog. This adds the missing REST 
capability, following Java's `RESTCatalog` and `RESTApi` contracts.
   
   ## Changes
   
   - Add `Catalog::{create_branch, drop_branch, fast_forward, list_branches}` 
with explicit unsupported defaults and a REST implementation.
   - Use Java's `branch`/`fromTag` request, empty forward request, branch 
endpoints and nullable branch-list response. Preserve server ordering and 
operation-specific errors, including missing table versus missing source tag.
   - Expose the four operations through thin `PaimonCatalog` Python methods and 
update type hints and documentation. Reuse identifier parsing for string and 
tuple inputs.
   - Reject empty and dot path components before a branch mutation can address 
another resource after URL normalization. Special characters remain URL encoded.
   - Keep metadata publication on the REST server. The native client does not 
perform filesystem cleanup or retry a failed mutation through another route.
   
   ## Verification
   
   - `cargo test --locked -p paimon --test rest_branch_test --test 
rest_api_test --test rest_catalog_test --features fulltext` — 184 passed.
   - `python -m pytest -q bindings/python/tests/test_catalog_branches.py 
bindings/python/tests/test_catalog_gil.py bindings/python/tests/test_table.py` 
— 69 passed.
   - `cargo +1.98.0 fmt --all -- --check` — passed.
   - `cargo +1.98.0 clippy --locked --workspace --all-targets --features 
fulltext,vortex -- -D warnings` — passed.
   - Cross-client check with PyPaimon's existing REST test server: native 
branch creation/from-tag/list/drop, PyPaimon branch writes, native Parquet/Blob 
reads, recreation from the original tag, and preservation of data files after 
branch deletion passed. That server only acknowledges fast-forward; its wire 
contract is separately covered by the Rust protocol tests and compared with 
Java.
   
   Two independent review passes covered Java protocol semantics and Python 
binding contracts. A reproduced dot-segment routing issue found during review 
was fixed and covered by no-request regression tests.
   


-- 
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]

Reply via email to