TheR1sing3un opened a new pull request, #8325:
URL: https://github.com/apache/paimon/pull/8325

   ## Purpose
   
   pypaimon already implements the full branch Catalog API (filesystem + REST), 
but the CLI had no way to manage branches. This adds branch management to the 
CLI.
   
   ## Changes
   
   Add a top-level `paimon branch {create,list,delete,rename,fast-forward}` 
command (alongside `table` / `db` / `catalog` / `sql`):
   
   ```shell
   paimon branch create db.t b1 [--tag v1]
   paimon branch list   db.t [--format table|json]
   paimon branch delete db.t b1
   paimon branch rename db.t b1 b2
   paimon branch fast-forward db.t b1
   ```
   
   - All operations go through the Catalog layer, so they get typed exceptions 
(`BranchAlreadyExistException` / `BranchNotExistException` / 
`TableNotExistException` / `TagNotExistException`) and work for both filesystem 
and REST catalogs.
   - `create --tag` builds a branch from a tag.
   - Command and argument names mirror the Java branch procedures 
(`create_branch` / `delete_branch` / `rename_branch` / `fast_forward`).
   - pypaimon CLI docs updated with a new "Branch Commands" section.
   
   Also covers the from-tag / fast-forward happy paths at the catalog-test 
layer (the `SameFileError` bug they previously worked around was fixed in 
#7756).
   
   ## Tests
   
   End-to-end CLI coverage for create / list / delete / rename / fast-forward, 
including `--tag`, table/json output, and the not-found / duplicate / 
invalid-identifier error paths; plus catalog-layer from-tag and fast-forward 
happy-path tests.
   
   ## Does this PR introduce a user-facing change?
   
   No.
   
   ---
   Generative AI disclosure: drafted with AI assistance and reviewed by the 
author.
   


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