Repository navigation
[python] Support tag rename and replace in the CLI - #10477
Open
Stephen0421 wants to merge 1 commit into
Open
Stephen0421 wants to merge 1 commit into
Stephen0421 wants to merge 1 commit into
Conversation
Filesystem catalogs rename and replace tag files. REST catalogs reject both because the API has no endpoint, so the CLI does not rewrite tag files behind the server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add
paimon tag renameandpaimon tag replacefor filesystem catalogs, and letpaimon tag createset a retention.Filesystem catalogs delegate to the existing
FileStoreTable.rename_tagandreplace_tag. A missing tag or a conflicting new name becomesTagNotExistExceptionorTagAlreadyExistException. A missing snapshot stays aValueError.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-retainedpasses the retention through tocatalog.create_tag. On replace, omitting--time-retainedrewrites the tag as a plain snapshot reference and drops a retention that was already set. That matches the existing tag-file format.Test plan
cli_tag_test: rename, name conflict, replace to a snapshot and to latest, create and replace with12h, missing tag, missing snapshot, replace without--time-retaineddrops TTLrest_tag_test: rename and replace raiseNotImplementedErrorand leave the server tag registry unchanged