Stephen0421 opened a new pull request, #10477: URL: https://github.com/apache/paimon/pull/10477
### Purpose Add `paimon tag rename` and `paimon tag replace` for filesystem catalogs, and let `paimon tag create` set a retention. Filesystem catalogs delegate to the existing `FileStoreTable.rename_tag` and `replace_tag`. A missing tag or a conflicting new name becomes `TagNotExistException` or `TagAlreadyExistException`. A missing snapshot stays a `ValueError`. REST catalogs reject both commands. The REST API only has create, get, list, and delete. Rewriting the tag file from the client would leave the server registry pointing at a name whose file is gone, and would skip the permission checks used by the other tag commands. `tag create --time-retained` passes the retention through to `catalog.create_tag`. On replace, omitting `--time-retained` rewrites the tag as a plain snapshot reference and drops a retention that was already set. That matches the existing tag-file format. ```shell paimon tag rename mydb.users v1 v2 paimon tag replace mydb.users v1 --snapshot-id 3 --time-retained 12h paimon tag create mydb.users v1 --time-retained 12h ``` ### Test plan - [x] `cli_tag_test`: rename, name conflict, replace to a snapshot and to latest, create and replace with `12h`, missing tag, missing snapshot, replace without `--time-retained` drops TTL - [x] `rest_tag_test`: rename and replace raise `NotImplementedError` and leave the server tag registry unchanged -- 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]
