[
https://issues.apache.org/jira/browse/ARROW-14902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dragoș Moldovan-Grünfeld updated ARROW-14902:
---------------------------------------------
Description:
Currently (arrow version 6.0.1 and readr version 2.1.0) we only support a few
of the {{readr::write_csv()}} arguments. Once ARROW-13623 is fixed
{{write_csv_arrow()}} will error 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.
was:
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.
> [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
> Priority: Major
>
> Currently (arrow version 6.0.1 and readr version 2.1.0) we only support a few
> of the {{readr::write_csv()}} arguments. Once ARROW-13623 is fixed
> {{write_csv_arrow()}} will error 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)