Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRPT] Affirm 3.3.2 line sep feature #28

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

roman-affirm
Copy link
Collaborator

@roman-affirm roman-affirm commented Feb 24, 2024

DRPT-913

Adding feature from 3.4 which allows to define \r\n line terminator before writing to csv files.

cherry picked from https://github.com/Affirm/all-the-things/pull/69877/files#diff-7c9bbec295689aae23a0cd057a7de14e12c373fa7e22b0c9439abe9770ef343f

Yaohua628 and others added 2 commits February 23, 2024 12:17
### What changes were proposed in this pull request?
Univocity parser allows to set line separator to 1 to 2 characters ([code](https://github.com/uniVocity/univocity-parsers/blob/master/src/main/java/com/univocity/parsers/common/Format.java#L103)), CSV options should not block this usage ([code](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala#L218)). This PR updates the requirement of `lineSep` accepting 1 or 2 characters in `CSVOptions`.

Due to the limitation of supporting multi-chars `lineSep` within quotes, I propose to leave this feature undocumented and add a WARN message to users.

### Why are the changes needed?
Unblock the usability of 2 characters `lineSep`.

### Does this PR introduce _any_ user-facing change?
No - undocumented feature.

### How was this patch tested?
New UT.

Closes apache#37107 from Yaohua628/spark-39689.

Lead-authored-by: yaohua <[email protected]>
Co-authored-by: Yaohua Zhao <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
@roman-affirm roman-affirm merged commit 6d19414 into affirm-3.3.2 Feb 26, 2024
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants