Files
egolearnerandCopilot Autofix powered by AI 07c40ba17a GH-39961: [C++][Python] Propagate CSV parse delimiter to write options (#49858)
### Rationale for this change
resolve #39961

### What changes are included in this PR?
When writing a dataset with CsvFileFormat configured with a custom ParseOptions delimiter (e.g. delimiter=">"), the output CSV still used the default "," delimiter. This was because:

- C++ CsvFileFormat::DefaultWriteOptions() always created WriteOptions::Defaults() with delimiter=',', ignoring the parse_options.delimiter stored on the format object.

- Python CsvFileFormat.make_write_options() unconditionally overwrote the C++ write options with a fresh WriteOptions(**kwargs), discarding any C++-side default that might have been set.

Fix the C++ side by propagating parse_options.delimiter into the write options in DefaultWriteOptions(). Fix the Python side by reading the delimiter from the C++ default when the caller does not explicitly specify one, preventing the overwrite from losing the propagated value.

### Are these changes tested?
Yes

### Are there any user-facing changes?
No

* GitHub Issue: #39961

Lead-authored-by: egolearner <lijiliang@outlook.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2026-07-21 09:30:26 +09:00
..