thisisnic commented on code in PR #33614:
URL: https://github.com/apache/arrow/pull/33614#discussion_r1072283476


##########
r/R/dataset-format.R:
##########
@@ -228,9 +225,32 @@ check_csv_file_format_args <- function(...) {
       call. = FALSE
     )
   }
+}
+
+get_opt_names <- function(args) {
+  opt_names <- names(args)
+
+  # extract names of parse_options, read_options, and convert_options
+  if ("parse_options" %in% names(args) && is.list(args[["parse_options"]])) {

Review Comment:
   `args[["parse_options"]]` can either be a list of options, or a 
`CsvParseOptions` object. This helper function is only designed to validate the 
former; the latter is more advanced/off-label usage and it's up to users to 
safely pass the correct arguments through here (you could argue that this 
shouldn't be the case, but doing it this way is consistent with how we've done 
this in other bits of the codebase).
   
   I thought about documenting this, but I don't know *where* it would go - I 
don't think inside this function?



-- 
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]

Reply via email to