hutiefang76 opened a new pull request, #12672:
URL: https://github.com/apache/seatunnel/pull/12672

   ### Purpose of this pull request
   
   CsvSerializationSchema joins columns with its configured delimiter but uses 
a comma-default CSVPrinter to decide whether each string needs quotes. With 
delimiter |, a value a|b is written without quotes and reads back as multiple 
columns.
   
   Configure the CSVPrinter with the same delimiter character used by the 
reader. Add round trips for comma, pipe, tab and U+0001, embedded 
quotes/newlines and nulls, plus a LocalFile write/read/assert fixture. The 
header writer is unchanged; this is separate from #10257.
   
   Fixes #12669.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, on dev. With non-comma delimiters, MINIMAL output bytes change to 
follow the actual delimiter: delimiter-containing strings are quoted, while a 
comma alone no longer forces quotes. Comma-delimited output retains its 
behavior. Quoting remains limited to top-level STRING values; multi-character 
delimiters are not expanded in scope.
   
   English and Chinese connector documentation are updated.
   
   ### How was this patch tested?
   
   JDK 17: CsvTextFormatSchemaTest, 7 tests passed after the fix. The same 
suite fails against the old serializer. The new container-based LocalFile 
scenario is separate from this unit result. Root build validation is still 
running; this PR is a draft until that result is recorded.
   
   ```shell
   ./mvnw -q spotless:apply
   ./mvnw -q -pl seatunnel-formats/seatunnel-format-csv -am 
-Dtest=CsvTextFormatSchemaTest -Dsurefire.failIfNoSpecifiedTests=false package
   ```
   
   Added a LocalFile CSV integration scenario that writes two rows containing a 
pipe and reads them back with the same delimiter, checking exact strings, row 
count and the neighboring integer column. Container execution is separate from 
the unit result above.
   
   ### Check list
   
   - [x] Added regression tests.
   - [x] Updated English and Chinese documentation.
   - [x] Existing connector integration coverage updated where applicable.
   
   No new connector, dependency or binary package.
   
   AI assistance: DeepSeek performed implementation and initial review; Codex 
coordinated final review, validation and submission.
   


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

Reply via email to