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

   ## Which issue does this PR close?
   
   - Closes #14583.
   
   ## Rationale for this change
   
   When executing DELETE statements with case-sensitive quoted table names, the 
table name was incorrectly being normalized to lowercase during table scan 
creation.
   
   The issue was introduced in commit 8b716d3 where the table name was being 
converted to a string before being passed to `LogicalPlanBuilder::scan()`. This 
caused it to be treated as a new SQL identifier and normalized again, losing 
case sensitivity.
   
   ## What changes are included in this PR?
   
   - Fixed DELETE statement handling to preserve case-sensitivity of table 
names by passing the already available and normalized `TableReference` directly 
to `LogicalPlanBuilder::scan()` instead of converting to string first
   
   ## Are these changes tested?
   
   Yes, added a new test in `datafusion/sql/tests/sql_integration.rs`:
   - `plan_delete_quoted_identifier_case_sensitive()`: verifies case-sensitive 
identifiers handling in DELETE statements
   
   ## Are there any user-facing changes?
   
   Users implementing ExecutionPlans for deletion will now get a correct table 
reference.
   
   No breaking changes or API changes are included.


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to