Skip to content

[python] Add table tag CLI subcommands#8320

Open
TheR1sing3un wants to merge 2 commits into
apache:masterfrom
TheR1sing3un:feat/python-cli-tag-commands
Open

[python] Add table tag CLI subcommands#8320
TheR1sing3un wants to merge 2 commits into
apache:masterfrom
TheR1sing3un:feat/python-cli-tag-commands

Conversation

@TheR1sing3un

Copy link
Copy Markdown
Member

Purpose

pypaimon already implements the full tag Catalog API (filesystem + REST), but the CLI had no way to manage tags — users had to drop down to the Python API. This adds tag management to the CLI.

Changes

Add paimon table tag {create,list,get,delete}, nested under the table command (mirroring table alter):

paimon table tag create db.t v1 [--snapshot-id N] [--ignore-if-exists]
paimon table tag list   db.t [--prefix P] [--format table|json]
paimon table tag get    db.t v1 [--format table|json]
paimon table tag delete db.t v1
  • All operations go through the Catalog layer, so they get typed exceptions (TagAlreadyExistException / TagNotExistException / TableNotExistException) and work for both filesystem and REST catalogs.
  • tag get surfaces tag_create_time / tag_time_retained when present.
  • list warns on stderr (rather than silently truncating) if the catalog returns a partial page.
  • pypaimon CLI docs updated with a new "Table Tag" section.

Flag names mirror the Java Flink/Spark tag procedures (snapshot_id, etc.).

Tests

End-to-end CLI coverage for create / list / get / delete, including --snapshot-id, --ignore-if-exists, --prefix, table/json output, and the not-found / duplicate / invalid-identifier error paths.

Does this PR introduce a user-facing change?

No.


Generative AI disclosure: drafted with AI assistance and reviewed by the author.

Add `paimon table tag {create,list,get,delete}` nested under the table
command (mirroring `table alter`). All operations go through the Catalog
layer so they get typed exceptions and work for both filesystem and REST
catalogs. `tag get` surfaces tag_create_time / tag_time_retained when
present. Document the new commands in the pypaimon CLI docs.
Cover create / list / get / delete end-to-end through the CLI, including
--snapshot-id, --ignore-if-exists, --prefix, table/json output, and the
not-found / duplicate / invalid-identifier error paths.
@JingsongLi

Copy link
Copy Markdown
Contributor

Maybe just paimon tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants