Repository navigation
[python] Use Native REST catalog branch operations - #10619
Merged
Merged
Conversation
sundapeng
added a commit
to sundapeng/paimon
that referenced
this pull request
Oct 17, 2026
The REST surface had drifted three ways:
- RESTApi sends replaceTable (POST .../tables/{table}/replace),
listSchemasPaged (GET .../tables/{table}/schemas) and loadSchema
(GET .../tables/{table}/schemas/{version}), but the spec listed none of
them. Add the routes plus ReplaceTableRequest, TableSchema,
ListSchemasResponse and GetSchemaResponse.
- apache#8023 retired the renameBranch REST endpoint because the server-side
rename is not atomic, and apache#10619 removed it from pypaimon, but the spec
still listed it. Drop the route and RenameBranchRequest from the spec.
- pypaimon registered 55 of Java's 74 openapi-v4 actions. Give it the
same table in the same order, since both resolve the first match, and
check that against DLFOpenApiActions.java.
sundapeng
added a commit
to sundapeng/paimon
that referenced
this pull request
Oct 17, 2026
The spec had drifted from RESTApi in two ways:
- RESTApi sends replaceTable (POST .../tables/{table}/replace),
listSchemasPaged (GET .../tables/{table}/schemas) and loadSchema
(GET .../tables/{table}/schemas/{version}), but the spec listed none of
them. Add the routes plus ReplaceTableRequest, TableSchema,
ListSchemasResponse and GetSchemaResponse.
- apache#8023 retired the renameBranch REST endpoint because the server-side
rename is not atomic, and apache#10619 removed it from pypaimon, but the spec
still listed it. Drop the route and RenameBranchRequest from the spec.
sundapeng
added a commit
to sundapeng/paimon
that referenced
this pull request
Oct 17, 2026
The spec had drifted from RESTApi in two ways:
- RESTApi sends replaceTable (POST .../tables/{table}/replace),
listSchemasPaged (GET .../tables/{table}/schemas) and loadSchema
(GET .../tables/{table}/schemas/{version}), but the spec listed none of
them. Add the routes plus ReplaceTableRequest, TableSchema,
ListSchemasResponse and GetSchemaResponse.
- apache#8023 retired the renameBranch REST endpoint because the server-side
rename is not atomic, and apache#10619 removed it from pypaimon, but the spec
still listed it. Drop the route and RenameBranchRequest from the spec.
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
Use Rust core for PyPaimon's existing REST branch operations, following Java's RESTCatalog and CatalogBranchManager semantics.
Depends on apache/paimon-rust#1141. Native CI continues to build Rust main; merge that PR first.
Changes
write.native.enabled, and listing withread.native.enabled. Existing CatalogBranchManager calls use the same route./configrequest. Preserve the live endpoint, owning authentication provider, headers and User-Agent. Translate structured Native errors through the existing public exception mappings.ignore_if_exists; preserve unknown 404 resource errors. Align REST rename with Java's unsupported operation and remove the invented REST rename endpoint/DTO.Verification
dev/cfg.iniandgit diff --check: passed. Rust core/binding Clippy and rustfmt also passed.Tests used a locally built binding from Rust #1141. Repeated review repaired STS cache loss and transport/header differences. Paimon REST authenticates each request, so no Python/Rust cookie or session synchronization is added. The final independent pass found no confirmed P0/P1/P2 issues under this scope.
The mock REST service acknowledges fast-forward; request semantics are covered by Rust protocol tests and Java comparison, without claiming a production server's snapshot switching was tested here.