You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Dragoș Moldovan-Grünfeld (Jira)" <ji...@apache.org> on 2021/11/29 15:36:00 UTC

[jira] [Created] (ARROW-14902) [R] Update write_csv_arrow() to support all args of readr::write_csv()

Dragoș Moldovan-Grünfeld created ARROW-14902:
------------------------------------------------

             Summary: [R] Update write_csv_arrow() to support all args of readr::write_csv()
                 Key: ARROW-14902
                 URL: https://issues.apache.org/jira/browse/ARROW-14902
             Project: Apache Arrow
          Issue Type: Improvement
          Components: R
            Reporter: Dragoș Moldovan-Grünfeld


Currently (arrow version 6.0.1 and readr version 2.1.0) we only support a few of the {{readr::write_csv()}} arguments. {{write_csv_arrow()}} currently errors if the user passes unsupported {{readr}} arguments. 

The following arguments need CsvWriteOptions (see linked issues) in order to be exposed to R users:
 * {{{}na{}}}: string used for missing values. Defaults to {{{}NA{}}}. Missing values are never quoted; strings with the same value as {{na}} will always be quoted.
 * {{{}append{}}}: boolean. If \{[FALSE}} will overwrite existing file. If {{TRUE}} will append to existing file. In both cases, if the file doesn't exist, a new file is created.
 * {{{}quote{}}}: how to handle fields which contain characters that need to be quoted:
 ** {{{}needed{}}}: only quote fields which need them
 ** {{{}all{}}}: quote all fields - I think this might be the implicit default behaviour for `write_csv_arrow()`
 ** {{{}none{}}}: never quote fields
 * {{{}escape{}}}: the type of escape to use when quotes are in the data:
 ** {{{}double{}}}: quotes are escaped by doubling them
 ** {{{}backslash{}}}: quotes are escaped by a preceding backslash
 ** {{{}none{}}}: quotes are not escaped
 * {{{}eol{}}}: the end of line character to use. Most commonly either "\n" for Unix style newlines, or "\r\n" for Windows style newlines.
 

Once these are enabled, update the signature of `write_csv_arrow()` and compare written files.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)