jonkeane commented on a change in pull request #11668:
URL: https://github.com/apache/arrow/pull/11668#discussion_r754729014
##########
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:
Yeah `sink` is a lot more than file path, and matches our other
functions. How awkward would it be to support both sink and filename? It's a
bit awkward, but it would make this match readr while also maintaining our
arrow patterns.
--
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]