Skip to content

[Python] Reuse typed native MERGE clauses and factories - #10764

Merged
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:codex/typed-merge-execution
Oct 23, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:codex/typed-merge-execution

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

Summary

  • Adapt normalized PyPaimon MERGE branches to SDK WhenMatched/WhenNotMatched and MergeAssignment objects for both existing table MERGE and distributed batch execution.
  • Use the named for_updates, for_deletes, and for_inserts factories. Restore requested deletion schema metadata at the Arrow boundary.
  • Preserve public PyPaimon MERGE APIs/types, ordered conditions, ON-key aliases, callable views, source handling, serialization and backend isolation.
  • Replace test dictionary transport expectations with typed SDK doubles and cover batch/stream table MERGE, mixed actions, all assignment forms and deletion schemas.

No public PyPaimon API or dependency changes. Native execution remains a thin adapter and has no Python executor dependency. No version probes or old protocol compatibility paths are added.

Verification

  • 105 focused protocol, public MERGE, metadata and execution-boundary tests passed; 16 Native cases skipped in the regular Python environment.
  • Arrow 16 compatibility: 35 passed, 1 skipped.
  • 156 real SDK/PyPaimon Native integration cases passed against the companion Rust implementation inside a Cargo PyO3 test executable, including the skipped MERGE/source-metadata cases and real batch execution adapters. No Native extension was installed or rebuilt into the Python environment; the temporary cross-repository runner is not committed.
  • Scoped flake8 and diff checks passed. Independent cross-review found no remaining actionable regressions.

Dependency

Depends on apache/paimon-rust#1204. This PR remains draft until that API reaches Rust main. Native CI continues to build main.

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@JingsongLi
JingsongLi merged commit d59063e into apache:master Oct 23, 2026
1 check 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