thisisnic opened a new issue, #36864:
URL: https://github.com/apache/arrow/issues/36864
### Describe the enhancement requested
The implementation of `read_csv_arrow()` intentionally mirrors
`readr::read_csv`. However, the implementation of `write_csv_arrow()` doesn't
closely mirror `readr::write_csv()`.
Now that we have additional convenience functions for `write_dataset()`
being implemented in #36436, this presents a problem in that the
`open_dataset()` convenience wrapper functions use the parameters from the
`read_*` functions to provide a common interface.
We could rewrite the interface for `write_csv_arrow()` to map more closely
to `readr::write_csv()` to enable these other changes. However, this would
constitute a breaking change. It's unclear how much user impact this would have.
Changes needed to be made to `write_csv_arrow()`:
* expose additional options available through `CsvWriteOptions`:
* `quoting_style`
* `eol`
* `delimiter`
* add parameter `quote` to `write_csv_arrow()`
* collapse parameters `sink` and `file` into a single parameter (by
checking the type of the object passed in and changing behavior accordingly)
* collapse parameters `include_header` and `col_names` into a single
parameter (`col_names`)
* removing the `batch_size` param (which should be specified in
`write_options`
* updating the default value of the `na` param to match `readr::write_csv`
* adding parameter `eol` which is mapped to that option
* potentially open an issue requesting the option to specify `escape` ("The
type of escape to use when quotes are in the data") OR just not implementing
this parameter OR implement it and set the default to whatever Arrow does by
default and raise an error if the user specifies an alternative value
### Component(s)
R
--
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]