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

   ## Which issue does this PR close?
   
   - Closes https://github.com/apache/datafusion/issues/10669
   
   ## Rationale for this change
   
   The CSV writer was missing support for `quote_style`, 
`ignore_leading_whitespace`, and `ignore_trailing_whitespace` options that are 
available on the underlying arrow `WriterBuilder`. This meant users couldn't 
control quoting behaviour or whitespace trimming when writing CSV files.
   
   ## What changes are included in this PR?
   
   Adds three new CSV writer options wired through the full stack:
   
   - `quote_style` — controls when fields are quoted (`Always`, `Necessary`, 
`NonNumeric`, `Never`). Modelled as a protobuf enum (`CsvQuoteStyle`).
   - `ignore_leading_whitespace` — trims leading whitespace from string values 
on write.
   - `ignore_trailing_whitespace` — trims trailing whitespace from string 
values on write.
   
   ## Are these changes tested?
   
   Yes — sqllogictest coverage added in `csv_files.slt`
   
   ## Are there any user-facing changes?
   
   Three new `format.*` options available in COPY TO and CREATE EXTERNAL TABLE 
for CSV:
   - `format.quote_style` (string: `Always`, `Necessary`, `NonNumeric`, `Never`)
   - `format.ignore_leading_whitespace` (boolean)
   - `format.ignore_trailing_whitespace` (boolean)
   


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