Skip to content

Add MERGE INTO types to datafusion-expr#20763

Open
wirybeaver wants to merge 1 commit intoapache:mainfrom
wirybeaver:feature/mergeinto-type
Open

Add MERGE INTO types to datafusion-expr#20763
wirybeaver wants to merge 1 commit intoapache:mainfrom
wirybeaver:feature/mergeinto-type

Conversation

@wirybeaver
Copy link

@wirybeaver wirybeaver commented Mar 6, 2026

Which issue does this PR close?

The task 1 of #20746

Rationale for this change

support MERGE INTO DML statements in the datafusion-expr

What changes are included in this PR?

Add new types to support MERGE INTO DML statements

  • MergeIntoOp: Carries ON condition and WHEN clauses
  • MergeIntoClause: Single WHEN clause (kind, predicate, action)
  • MergeIntoClauseKind: Matched/NotMatched/NotMatchedByTarget/NotMatchedBySource
  • MergeIntoAction: Update/Insert/Delete actions

Add WriteOp::MergeInto variant to WriteOp enum.

Are these changes tested?

Unit Test

Add new types to support MERGE INTO DML statements:
- MergeIntoOp: Carries ON condition and WHEN clauses
- MergeIntoClause: Single WHEN clause (kind, predicate, action)
- MergeIntoClauseKind: Matched/NotMatched/NotMatchedByTarget/NotMatchedBySource
- MergeIntoAction: Update/Insert/Delete actions

Add WriteOp::MergeInto variant to WriteOp enum.
@github-actions github-actions bot added the logical-expr Logical plan and expressions label Mar 6, 2026
@wirybeaver wirybeaver mentioned this pull request Mar 6, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant