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

Francois Saint-Jacques updated ARROW-7690:
------------------------------------------
    Priority: Major  (was: Minor)

> Cannot write parquet to OutputStream
> ------------------------------------
>
>                 Key: ARROW-7690
>                 URL: https://issues.apache.org/jira/browse/ARROW-7690
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 0.15.1
>            Reporter: Bob
>            Priority: Major
>
> The R package does not allow for the ability to write to a FileOutputStream. 
> Minimal testing code:
> library(arrow)
> tf1 <- arrow::FileOutputStream$create(path = "output.parquet")
> arrow::write_parquet(data.frame(x = 1:5), tf1)
> Throws error:
> Error in inherits(sink, OutputStream) : 'what' must be a character vector
>  
> The issue appears to be in line 153 of parquet.R
> if (is.character(sink)) {
>  sink <- FileOutputStream$create(sink)
>  on.exit(sink$close())
>  } *else if (!inherits(sink, OutputStream))* {
>  abort("sink must be a file path or an OutputStream")
>  }
>  
> Should be !inherits(sink,'OutputStream')



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to