Skip to content

fix(datafusion): preserve string literals when rewriting MERGE references - #1266

Merged
JingsongLi merged 1 commit into
apache:mainfrom
slfan1989:paimon-rust-1265
Nov 1, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
slfan1989:paimon-rust-1265

Conversation

@slfan1989

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #1265

Fix MERGE rewriting table names inside string literals, causing incorrect stored values or predicate results.

Brief change log

  • Rewrite table qualifiers through the SQL AST instead of text replacement.
  • Preserve string literals and column names.
  • Add regression tests for ON/WHEN predicates and UPDATE/INSERT values.

Tests

  • Confirmed both new regression tests fail before the fix.

API and Format

No.

Documentation

No.

@QuakeWang QuakeWang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@JingsongLi
JingsongLi merged commit 8df32eb into apache:main Nov 1, 2026
15 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor Author

@QuakeWang @JingsongLi Thanks for reviewing and merging this PR!

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.

[Bug] MERGE incorrectly rewrites table names inside string literals

3 participants