Repository navigation
[Python] Align execution backend APIs and boundaries - #10712
Merged
JingsongLi merged 5 commits intoOct 21, 2026
Merged
Conversation
JingsongLi
marked this pull request as draft
October 21, 2026 08:08
JingsongLi
marked this pull request as ready for review
October 21, 2026 08:41
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
Companion apache/paimon-rust#1187 has merged as
e602ec58. Native CI continues to build Rust main; no dependency override or old-extension fallback is needed.Restrict
executionto corresponding Python and Rust implementations of Paimon operations. Shared control logic, transport adapters and third-party framework integrations stay in their owning modules. This also corrects excessive moves introduced in #10699 and #10707.pypaimon.ray.vector_index_buildand common system-table Arrow output topypaimon.table.system. Keep the Native system metadata adapter separate.read,write,globalindexandtable.source. Merge shared write input helpers into the existingwrite.input_adaptermodule. Restore TableRead's framework conversion methods inline.execution/python, and corresponding Rust adapters inexecution/native. Match corresponding capabilities rather than requiring identical module names. The backends remain independent.write, so local Python and Native MERGE do not load Ray orchestration. Preserve public Ray helper entry points and signatures.Existing public API paths, signatures, defaults, class identities and supported hooks are preserved. Stream controls and shard close are additive. No new runtime dependencies. The stream conversion rollback uses the companion Rust scan-state copy API. Native tests used the existing extension without rebuilding or installing it.
Initial layout verification
062b22e0ad): signatures, annotations, decorators and class bases unchanged. Independent review also checked framework serialization and public hooks.Execution API and semantic alignment
Audit the corresponding operations against current Java master (
33a8cd34d3) and Rust main (e4ec3a45). The relevant Java/Rust reference APIs are unchanged from the local reference implementations. Companion apache/paimon-rust#1187 adds Core scan-state cloning and the standard Python copy protocol for transactional Native result conversion.file_store_commitaccess, overwrite scope, callbacks, empty commits, explicit abort and uncertain-publication file preservation.API alignment verification
Known pre-existing capability difference: Python Data Evolution reads reject nested ROW field projection while Rust supports it. This PR does not add that Python read capability or expand Rust-only features.
Rust companion verification: Core clone behavior test passed; Python binding cargo check and both scoped Rust 1.98 Clippy gates passed. The new copy API owns callback references independently and uses the standard Python copy protocol. No Python version probes or extra metadata reads were added.
The companion Rust embedded-Python GC unit test also passed (1 case): both callback ownership forms, independent cursors and collection of both wrappers' reference cycles, without rebuilding or installing a Python extension.
Review against merged Rust main
Re-audited execution inputs, outputs, lifecycle and failure semantics against Rust main
e602ec58and current Java. Preserve all existing public signatures and keep both backends independent.long/ Rusti64before consuming input, running callbacks, preparing files or publishing snapshots. Invalid identifiers cannot publish unreadable snapshots or consume an update operation.Plan.stats()remains optional while Native records lightweight counters. Post-write reconfiguration restrictions and the Native batch adapter's existing optional argument syntax are unchanged.Final coherent protocol, regression and backend-boundary group: 256 passed, 8 skipped (Native integration cases require an available SDK). Additional writer/lifecycle regressions: 206 passed, 50 skipped; existing index-build/partition-predicate regressions: 68 passed. Groups overlap. Independent reviews revalidated input boundaries, immutable predicates, exact index deletion scope, cleanup errors and backend isolation. No Python extension was installed or rebuilt.
Final static gates passed: whole-package Flake8 using the repository configuration, all 1,182 Python license headers, changed/new Python 3.6 grammar (19 files), diff checks, and 286 existing class/function contracts unchanged versus the preceding HEAD. The separate broad RAT scan found only a pre-existing untracked
dev/logruntime log; no source-header failures were found.