dragosmg commented on a change in pull request #12170:
URL: https://github.com/apache/arrow/pull/12170#discussion_r788711531
##########
File path: r/R/dataset-format.R
##########
@@ -309,14 +309,52 @@ FileWriteOptions <- R6Class("FileWriteOptions",
inherit = ArrowObject,
public = list(
update = function(table, ...) {
+ compose_err_header <- function(unsupported_passed_args) {
+ paste0(
+ oxford_paste(unsupported_passed_args),
+ ngettext(length(unsupported_passed_args),
+ " is not a valid argument ",
+ " are not valid arguments "),
+ "for your chosen `format`."
Review comment:
Also, the user might not be aware that when `type %in% c("parquet",
"arrow", "ipc")` implementation happens through `IpcFileWriteOptions` and once
we are inside `FileWriteOptions$update()` we are unaware of the exact value
passed for `format` (as it has been transformed into a `FileFormat` object).
Hence my somewhat ambiguous formulation `"your chose format"`. We could try to
print supported `args`, but that might make it a bit more confusing and
difficult to keep in sync with the function docs.
--
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]