paleolimbot commented on code in PR #34009:
URL: https://github.com/apache/arrow/pull/34009#discussion_r1096567202
##########
r/R/filesystem.R:
##########
@@ -462,12 +462,13 @@ s3_bucket <- function(bucket, ...) {
if (!is_url(bucket)) {
bucket <- paste0("s3://", bucket)
}
- fs_and_path <- FileSystem$from_uri(bucket)
- fs <- fs_and_path$fs
+
+ if (!length(args)) {
+ fs_and_path <- FileSystem$from_uri(bucket)
+ fs <- fs_and_path$fs
+ } else {
# If there are no additional S3Options, we can use that filesystem
- # Otherwise, take the region that was detected and make a new fs with the
args
- if (length(args)) {
- args$region <- fs$region
+ # If user specifies args, they must specify region as arg, env var, or config
fs <- exec(S3FileSystem$create, !!!args)
Review Comment:
Looks like you need to define `fs_and_path` here somehow?
--
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]