You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/10/27 17:42:00 UTC

[jira] [Updated] (ARROW-17761) [R] read_parquet shows misleading message about url scheme when reading from s3 failed

     [ https://issues.apache.org/jira/browse/ARROW-17761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicola Crane updated ARROW-17761:
---------------------------------
        Parent: ARROW-18180
    Issue Type: Sub-task  (was: Bug)

> [R] read_parquet shows misleading message about url scheme when reading from s3 failed
> --------------------------------------------------------------------------------------
>
>                 Key: ARROW-17761
>                 URL: https://issues.apache.org/jira/browse/ARROW-17761
>             Project: Apache Arrow
>          Issue Type: Sub-task
>          Components: R
>            Reporter: Alex Deng
>            Priority: Minor
>             Fix For: 11.0.0
>
>
> When reading from s3 failed, the error message user get is 
> {quote}Error in url(file, open = "rb") : URL scheme unsupported by this method
>  
> {quote}
> The reason is in arrow:::make_readable_file, the code tries to create a filesystem from path and if this step failed, it tries to run is_url which doesn't supports s3. s3 reading can fail due to many reasons, from auth to s3 path doesn't exist. The request is to make the error message more useful. 
>  
> {quote}> arrow:::make_readable_filefunction (file, mmap = TRUE) 
> \{
>     if (inherits(file, "SubTreeFileSystem")) {
>         filesystem <- file$base_fs
>         path <- sub("/$", "", file$base_path)
>         file <- filesystem$OpenInputFile(path)
>     }
>     else if (is.string(file)) \{
>         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"))
>             })
>         }{quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)