Skip to content

[python] Add drop_partitions support to FileSystem catalog and CLI#7911

Merged
JingsongLi merged 1 commit into
apache:masterfrom
JunRuiLee:pypaimon-drop-partition
May 20, 2026
Merged

[python] Add drop_partitions support to FileSystem catalog and CLI#7911
JingsongLi merged 1 commit into
apache:masterfrom
JunRuiLee:pypaimon-drop-partition

Conversation

@JunRuiLee
Copy link
Copy Markdown
Contributor

Purpose

Add drop_partitions support for the Python FileSystem catalog and expose it through the PyPaimon CLI, aligned with the Java implementation by using the table batch commit path and truncate_partitions semantics to generate an overwrite commit that removes the specified partition data.

Tests

Added coverage for:

  • Dropping a single partition through FileSystemCatalog.drop_partitions.
  • Dropping multiple partitions through FileSystemCatalog.drop_partitions.
  • Rejecting an empty partition list.
  • Dropping a single partition through the CLI.
  • Dropping multiple partitions through repeated CLI --partition options.

Implement drop_partitions() in FileSystemCatalog following the same
pattern as RESTCatalog: get table, create BatchTableCommit, call
truncate_partitions.

Add 'paimon table drop-partition' CLI command that accepts one or more
--partition flags with key=value specs.
@JunRuiLee JunRuiLee force-pushed the pypaimon-drop-partition branch from 1bcece0 to aa32e9a Compare May 20, 2026 07:47
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit b66b648 into apache:master May 20, 2026
6 checks passed
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