dragosmg commented on a change in pull request #11668:
URL: https://github.com/apache/arrow/pull/11668#discussion_r752092203
##########
File path: r/R/csv.R
##########
@@ -623,8 +632,38 @@ readr_to_csv_convert_options <- function(na,
#' @include arrow-package.R
write_csv_arrow <- function(x,
sink,
+ na = NULL,
+ append = NULL,
+ quote = NULL,
+ escape = NULL,
+ eol = NULL,
+ num_threads = NULL,
+ progress = NULL,
include_header = TRUE,
batch_size = 1024L) {
+
+ passed_args <- as.list(match.call()[-1])
+
+ arrow_write_opts <- names(formals(CsvWriteOptions$create))
+ write_args <- names(formals(write_csv_arrow))
+
+ unsupported_opts <- setdiff(
+ write_args,
+ union(arrow_write_opts, c("x", "sink"))
+ )
+
+ unsupported_passed_args <- names(unlist(passed_args[unsupported_opts]))
+
+ if (length(unsupported_passed_args)) {
+ stop(
+ "The following ",
+ ngettext(length(unsupported_passed_args), "argument is ", "arguments are
"),
+ "not yet supported in Arrow: ",
+ oxford_paste(unsupported_passed_args),
+ call. = FALSE
+ )
+ }
Review comment:
@jonkeane & @paleolimbot do we change the name of the write_csv_arrow()
argument from sink to file? What about include_header to col_names?
--
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]