nealrichardson commented on a change in pull request #10326:
URL: https://github.com/apache/arrow/pull/10326#discussion_r640963069
##########
File path: r/R/util.R
##########
@@ -110,3 +110,15 @@ handle_embedded_nul_error <- function(e) {
}
stop(e)
}
+
+handle_parquet_io_error <- function(e, format) {
Review comment:
You aren't using `format` in here anymore--shouldn't you? Assuming you
delete the format handling I suggested above, in here you will know that
`format` is default if `is.character(format) && length(format) > 1` (i.e.
`c("parquet", "arrow", "ipc", "feather", "csv", "tsv", "text")`)
##########
File path: r/R/dataset.R
##########
@@ -92,9 +105,19 @@ open_dataset <- function(sources,
})
return(dataset___UnionDataset__create(sources, schema))
}
- factory <- DatasetFactory$create(sources, partitioning = partitioning, ...)
- # Default is _not_ to inspect/unify schemas
- factory$Finish(schema, isTRUE(unify_schemas))
+ if (is.character(format)) {
+ format <- FileFormat$create(match.arg(format), ...)
+ } else {
+ assert_is(format, "FileFormat")
+ }
Review comment:
Is this necessary? Won't DatasetFactory$create() handle this for you?
```suggestion
```
--
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:
[email protected]