QuakeWang opened a new pull request, #27166:
URL: https://github.com/apache/datafusion/pull/27166

   ## Which issue does this PR close?
   
   Closes #27164.
   
   ## Rationale for this change
   
   DELETE discarded the target alias and resolved predicates against the 
original table name. As a result, `DELETE FROM target AS d WHERE d.id = 1` 
failed while the equivalent SELECT worked.
   
   ## What changes are included in this PR?
   
   Resolve predicates against the aliased scan while retaining the real table 
as the write target. Apply existing alias scope and identifier normalization 
rules, and reject target alias column lists.
   
   Scope is limited to single-table DELETE.
   
   ## What is the testing strategy for this PR?
   
   Add SQL regression tests for execution, alias scope, quoted identifiers, and 
unsupported forms with optimization enabled and disabled. DELETE/UPDATE 
regressions and the extended workspace suite pass.
   
   ## Are there any user-facing changes?
   
   Single-table DELETE now resolves alias-qualified predicates correctly. No 
public API changes.
   
   AI-assisted contribution.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to