paleolimbot commented on code in PR #37024:
URL: https://github.com/apache/arrow/pull/37024#discussion_r1289066619


##########
r/R/io.R:
##########
@@ -250,15 +250,8 @@ make_readable_file <- function(file, mmap = TRUE, 
random_access = TRUE) {
     }
 
     if (is_url(file)) {
-      file <- tryCatch(
-        {
-          fs_and_path <- FileSystem$from_uri(file)
-          fs_and_path$fs$OpenInputFile(fs_and_path$path)
-        },
-        error = function(e) {
-          MakeRConnectionInputStream(url(file, open = "rb"))
-        }
-      )
+      fs_and_path <- FileSystem$from_uri(file)
+      file <- fs_and_path$fs$OpenInputFile(fs_and_path$path)

Review Comment:
   I believe this will cause reading from an http(s) URL to fail where 
previously it worked for IPC and CSV:
   
   ``` r
   
arrow::read_ipc_stream("https://github.com/apache/arrow-testing/raw/master/data/arrow-ipc-stream/integration/1.0.0-littleendian/generated_primitive.stream";)
 |> nrow()
   #> [1] 37
   ```
   
   Obviously that was a bad design on my part when I added this! Probably a 
better approach would be to add `if(is_http_url(file)) { file <- 
MakeRConnectionInputStream(url(file, open = "rb")) }` above this. 



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