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

Neal Richardson resolved ARROW-7690.
------------------------------------
    Fix Version/s: 0.16.0
       Resolution: Fixed

Issue resolved by pull request 6304
[https://github.com/apache/arrow/pull/6304]

> [R] 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
>              Labels: pull-request-available
>             Fix For: 0.16.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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