Repository navigation
[datafusion] Execute MERGE INTO through the native planner - #1315
Merged
Merged
Conversation
SteNicholas
reviewed
Nov 3, 2026
Member
There was a problem hiding this comment.
@JingsongLi, I left two inline comments on MERGE expression handling. PTAL.
SteNicholas
reviewed
Nov 3, 2026
Member
There was a problem hiding this comment.
@JingsongLi, one non-blocking test-helper cleanup suggestion.
JingsongLi
force-pushed
the
codex/native-merge-planner
branch
from
November 3, 2026 11:59
9bb60b0 to
ebcedfc
Compare
This was referenced Nov 3, 2026
JingsongLi
added a commit
that referenced
this pull request
Nov 10, 2026
* [datafusion] Execute MERGE INTO through the native planner * [datafusion] Fix native MERGE scope and execution edge cases * [datafusion] Consolidate MERGE implementation and extract tests * [datafusion] Cover MERGE review expression regressions * [datafusion] Remove unused MERGE test helper parameters (cherry picked from commit 062f1bc)
jackylee-ch
added a commit
to jackylee-ch/paimon-rust
that referenced
this pull request
Nov 11, 2026
Merge upstream/main e8939e5. MERGE INTO now runs through the native planner (apache#1315), so refuse an incremental window where it reads the target: plan_merge checks the target's options next to its time-travel check, and normalize_merge_into refuses a session window as it refuses session time travel. Port IncrementalQueryExec to the DataFusion 55 ExecutionPlan API (apache#1236).
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 DataFusion 55's native MERGE planner and Paimon's table provider for execution. Planning and EXPLAIN must not mutate tables; executing the DML plan applies the merge and returns its affected-row count.
Brief change log
Tests
API and Format
MERGE through SQLContext now returns a native lazy DML DataFrame; collect/execute the plan to perform the write. Storage formats and public Rust signatures are unchanged. The executor materializes the captured source and CoW target batches; large-input memory/performance behavior has not been benchmarked. Alias resolution follows the native planner; existing data-evolution action limitations remain.
Documentation
Update SQL support, MERGE execution and syntax limits, SQLOptions behavior, and the epoch-millisecond contract for timestamp procedures.