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

Fix FormatOptions::CSV propagation #10912

Merged
merged 6 commits into from
Jun 22, 2024

Conversation

svranesevic
Copy link
Contributor

Which issue does this PR close?

/

Rationale for this change

Noticed while using LogicalPlan::Copy with FormatOptions::CSV that escape and quote options were not reflected in resulting CSV file.

What changes are included in this PR?

Are these changes tested?

First time contributor, would need guidance how/if to test these best.

Are there any user-facing changes?

  • Add double_quote to CsvOptions options - 75a9b4c

@alamb
Copy link
Contributor

alamb commented Jun 15, 2024

Thank you so much for this contribution @svranesevic Can you perhaps add a test for this feature?

Maybe in
https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/csv_files.slt

@alamb
Copy link
Contributor

alamb commented Jun 21, 2024

Marking as draft as I think this PR is no longer waiting on feedback. Please mark it as ready for review when it is ready for another look

@alamb alamb marked this pull request as draft June 21, 2024 16:36
@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jun 21, 2024
@svranesevic svranesevic marked this pull request as ready for review June 21, 2024 20:47
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @svranesevic -- this looks great to me

@alamb
Copy link
Contributor

alamb commented Jun 22, 2024

I merged up from main and updated the vendored code in this PR

@alamb alamb merged commit 08e4e6a into apache:main Jun 22, 2024
23 checks passed
@alamb
Copy link
Contributor

alamb commented Jun 22, 2024

Thanks again @svranesevic 🚀

@svranesevic svranesevic deleted the fix/csv_options_propagation branch June 22, 2024 14:28
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* Fix sink output schema being passed in to `FileSinkExec` where input schema was expected

* Propagate CSV options (quote, double quote, and escape) through protos

* Add test for double quotes

* Test quote escape when double quotes are disabled

* regen

---------

Co-authored-by: svranesevic <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants