slfan1989 opened a new issue, #1265:
URL: https://github.com/apache/paimon-rust/issues/1265

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/paimon-rust/issues) and found nothing 
similar.
   
   
   ### Please describe the bug 🐞
   
   MERGE uses text replacement to rewrite table references, which also changes 
matching text inside string literals.
   
   For example, for a matched row:
   
   ```sql
   MERGE INTO paimon.test_db.target t
   USING paimon.test_db.source s
   ON t.id = s.id
   WHEN MATCHED THEN
     UPDATE SET name = 'paimon.test_db.source.payload';
   ```
   
   Expected: `name` is `'paimon.test_db.source.payload'`.
   Actual: `name` becomes `'s.payload'`.
   
   This also affects literals in ON/WHEN predicates and INSERT values.
   
   ### Solution
   
   Rewrite table qualifiers through the SQL AST instead of text replacement, 
preserving string literals and column names.
   
   Add regression tests for ON/WHEN predicates and UPDATE/INSERT values.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to