You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "amoeba (via GitHub)" <gi...@apache.org> on 2023/03/15 19:26:39 UTC

[GitHub] [arrow] amoeba opened a new issue, #34577: [R][Python] Expand coverage of and align R/Python to C++ CSV WriteOptions

amoeba opened a new issue, #34577:
URL: https://github.com/apache/arrow/issues/34577

   ### Describe the enhancement requested
   
   A user reported elsewhere that they couldn't set the delimiter in R's `CsvWriteOptions$create` in order to write, for example, a tab-delimited text file instead of a CSV. The signature is currently:
   
   ```r
   CsvWriteOptions$create <- function(include_header = TRUE, batch_size = 1024L, null_string = "") {}
   ```
   
   [Reference: arrow/r/R/csv.R](https://github.com/apache/arrow/blob/6ba2255c83d4813ee75e710d879ef8ff8f7c7539/r/R/csv.R#L500)
   
   These arguments map to options offered in `arrow/cpp/arrow/csv/options.h` for `WriteOptions` which includes a `delimiter` option in addition to others:
   
   - `bool include_header`
   - `int32_t batch_size`
   - `char delimiter`
   - `std::string null_string`
   - `std::string eol`
   - `QuotingStyle quoting_style`
   
   I also notice PyArrow has a different set of options in `pyarrow.csv.WriteOptions` than R does:
   
   - include_header 
   - batch_size
   - delimiter
   - quoting_style
   
   [Reference: arrow/python/pyarrow/_csv.pyx]( https://github.com/apache/arrow/blob/6ba2255c83d4813ee75e710d879ef8ff8f7c7539/python/pyarrow/_csv.pyx#L1320)
   
   I think it would be really helpful if the full set of C++ CSV WriteOptions were available to both R and Python and that the set of options available in R and Python were identical. What do others think about aligning R and Python so all six C++ options are available to each? cc @thisisnic 
   
   ### Component(s)
   
   Python, 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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] thisisnic commented on issue #34577: [R][Python] Expand coverage of and align R/Python to C++ CSV WriteOptions

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #34577:
URL: https://github.com/apache/arrow/issues/34577#issuecomment-1490313500

   Exposing that functionality sounds good to me!  The only small comment I have is that given that `CSVWriteOptions$create()` in R is an exported function, it'd be good to keep the existing arguments in the order they are now and add the new ones at the end.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org