Expose option to set line terminator for CSV writer - #9617
Conversation
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thank you @svranesevic
I have one request to reduce the size of this PR by reducing redundany in the tests, but otherwise I think this one is ready to go
| } | ||
|
|
||
| #[test] | ||
| fn test_write_csv_with_lf_terminator() { |
There was a problem hiding this comment.
these tests are quite repetitive (they are like 20 lines long but the only difference is 2 lines -- the terminaor and the expected output)
Can you please refactor them into a common harness so that it is easier for (me, a human) to review them and ensure coverage is adequate?
Thank you
There was a problem hiding this comment.
I am trying to clear up the PR review queue, so I took the liberty of pushing a commit that reduces the test replication and merged up from main
There was a problem hiding this comment.
Thank you! Is there anything else for me to take care of?
|
run benchmarks csv_writer |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 9571_arrow-csv_custom_line_terminator (21f3146) to 61b5763 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmarks csv_writer |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 9571_arrow-csv_custom_line_terminator (21f3146) to 61b5763 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
Performance results look good to me (no change) |
# Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#9571. # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Enable configuring line terminator for CSV writer. # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> See above. # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Yes, added tests. # Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. --> Yes, expose option to set line terminator for CSV writer. --------- Co-authored-by: svranesevic <svranesevic@users.noreply.github.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Working build * Bulk RLE encode (TODO: upstream) * Expose option to set line terminator (apache#9617 v58) * Fix `extend_nulls` panic for UnionArray (apache#9607 v58) (#82) --------- Co-authored-by: Thomas Peiselt <pi@kulturguerilla.org> Co-authored-by: Georgi Krastev <georgi.krastev@coralogix.com> Co-authored-by: Brent Gardner <bgardner@squarelabs.net>
Which issue does this PR close?
Rationale for this change
Enable configuring line terminator for CSV writer.
What changes are included in this PR?
See above.
Are these changes tested?
Yes, added tests.
Are there any user-facing changes?
Yes, expose option to set line terminator for CSV writer.