You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/25 12:35:51 UTC

[GitHub] [arrow] romainfrancois commented on a change in pull request #10326: ARROW-12791: [R] Better error handling for DatasetFactory$Finish() when no format specified

romainfrancois commented on a change in pull request #10326:
URL: https://github.com/apache/arrow/pull/10326#discussion_r638745701



##########
File path: r/R/util.R
##########
@@ -110,3 +110,12 @@ handle_embedded_nul_error <- function(e) {
   }
   stop(e)
 }
+
+handle_parquet_io_error <- function(e, format) {
+  msg <- conditionMessage(e)
+  if (grepl("Parquet magic bytes not found in footer", msg) && is.null(format)) {
+      e$message <- paste0(msg, "\nDid you mean to specify a 'format' other than the default (parquet)?")
+  }
+  stop(e)

Review comment:
       I think it's also a good place for: 
   
   ```
   abort(c(
     msg, 
     i = "Did you mean to specify a 'format' other than the default (parquet)?"
   ))
   ```
   
   Since this refers to `format`, would it be useful to add it as the argument list of `open_dataset()`, then I suppose we wouldn't need 
   
   ```r
   args <- list2(...)
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org