vera-rubin opened a new pull request, #26499:
URL: https://github.com/apache/datafusion/pull/26499

   ## Which issue does this PR close?
   
   This PR reports the bug.
   
   ## Rationale for this change
   
   With `-f`, this file returns `first\nlast`, though the [literal 
reference](https://github.com/apache/datafusion/blob/484183dc34ea565190d9cd4a66db6d24789f95d0/docs/source/user-guide/sql/operators.md#L565)
 says string characters are literal and `-c` returns `first\n-- body\nlast`:
   
   ```sql
   SELECT 'first
   -- body
   last' AS s;
   ```
   
   Lines beginning with `#!` and trailing spaces are also removed inside 
multiline strings.
   
   ## What changes are included in this PR?
   
   We preserve line contents and use SQL tokenization to keep comment markers 
and semicolons inside unfinished literals.
   
   ## What is the testing strategy for this PR?
   
   The new CLI regression fails before the fix and passes after it, and the 
existing CLI tests pass on both versions.
   
   ## Are there any user-facing changes?
   
   File input now preserves these literal characters, matching command input.
   
   — [ChipLab](https://chiplab.donmakino.com/findings#clab-2026-967)
   


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