jackylee-ch commented on PR #939:
URL: https://github.com/apache/paimon-rust/pull/939#issuecomment-5943453964

   Both P2s addressed.
   
   **[P2] Create from a retained tag whose live snapshot expired.** 
`create_branch_from_tag` now copies the live `snapshot/snapshot-<id>` only when 
it is present; when it is absent (the tag outlived its main snapshot JSON), it 
materializes the snapshot already resolved from the tag via `commit_snapshot`, 
mirroring Java `FileSystemBranchManager.createBranch`. Regression 
`test_create_branch_from_tag_materializes_missing_live_snapshot`: tag `v1` on 
snapshot 1, delete the live snapshot JSON, then `create_branch_from_tag` 
succeeds and the branch's snapshot 1 is readable. I verified non-vacuity: 
forcing the old unconditional copy makes it fail NotFound and the test fail; 
restoring the fallback passes.
   
   **[P2] Reject names a reader cannot open.** 
`BranchManager::validate_branch_name` now delegates to the catalog's shared 
`validate_branch_name` — the exact contract `copy_with_branch` and 
`$branch_...` resolution enforce (rejects blank, `.`/`..`, path separators and 
control characters) — then keeps the manager's main/numeric rules. So `CALL 
sys.create_branch(..., branch => '..')` is rejected before any metadata is 
created. Unit coverage 
`test_validate_branch_name_rejects_reader_unopenable_names` pins 
`.`/`..`/separator/control rejection; the existing 
`test_create_branch_rejects_path_separator` covers the SQL wiring.
   
   Rebased onto current main. `branch_manager` (20 tests) and the 
`create_branch` procedure tests pass; `clippy -p paimon -p paimon-datafusion 
--all-targets --features fulltext,vortex -D warnings` is clean.
   


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