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

   ## Purpose
   
   REST catalogs may represent a branch as a distinct catalog entity with its 
own UUID. `Table::copy_with_branch` currently compares the target branch UUID 
with the loaded handle UUID, which rejects that valid model even when both 
resolve to the same table location.
   
   ## Changes
   
   - Verify that the source REST handle still resolves to the UUID it was 
loaded with before switching branches.
   - Resolve the source identity and target branch concurrently.
   - Keep the existing location check so a branch resolving to another table 
location is still rejected.
   - Cover distinct branch identities and stale source branch handles in the 
REST catalog integration tests.
   
   ## Safety and compatibility
   
   Catalogs that reuse the base table UUID for branch responses continue to 
work. A stale source handle is still rejected by UUID, and a target at another 
location is still rejected.
   
   The REST response does not expose an explicit parent-table identity, so this 
keeps the existing table-location check as the branch membership boundary while 
moving UUID freshness validation to the source handle.
   
   ## Verification
   
   - `cargo fmt --all -- --check`
   - `cargo check -p paimon --all-targets --features fulltext,vortex`
   - `cargo clippy -p paimon --all-targets --features fulltext,vortex -- -D 
warnings`
   - `cargo test -p paimon --test rest_catalog_test 
test_branch_write_copy_loads_catalog_schema_with_distinct_identity -- --exact 
--test-threads=1`
   - `cargo test -p paimon --test rest_catalog_test 
test_branch_write_copy_rejects_replaced_source_identity_or_location -- --exact 
--test-threads=1`


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