You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/14 22:55:00 UTC

[jira] [Updated] (ARROW-8615) [R] Error better and insist on RandomAccessFile in read_feather

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

ASF GitHub Bot updated ARROW-8615:
----------------------------------
    Labels: pull-request-available  (was: )

> [R] Error better and insist on RandomAccessFile in read_feather
> ---------------------------------------------------------------
>
>                 Key: ARROW-8615
>                 URL: https://issues.apache.org/jira/browse/ARROW-8615
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 0.16.0, 0.17.0
>         Environment: R version 3.6.3 (2020-02-29)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 18.04.4 LTS
> other attached packages:
> [1] arrow_0.17.0
> loaded via a namespace (and not attached):
>  [1] tidyselect_1.0.0 bit_1.1-15.2     compiler_3.6.3   magrittr_1.5    
>  [5] assertthat_0.2.1 R6_2.4.1         glue_1.4.0       Rcpp_1.0.4.6    
>  [9] bit64_0.9-7      vctrs_0.2.4      rlang_0.4.5      purrr_0.3.4 
>            Reporter: Lucas Nesi
>            Assignee: Neal Richardson
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: x.gz
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The use of read_feather function with CompressedInputStream fails with the error:
>  
> {code:java}
> Error in ipc___feather___Reader__Open(file) : 
>  Invalid: File is too small to be a well-formed file
> {code}
> The minimal code to get it:
> {code:java}
> filename <- "x.gz"
> data <- data.frame(c(1,2), c(3,4), stringsAsFactors=FALSE)
> fos <- FileOutputStream$create(filename)
> codec <- Codec$create("gzip")
> cos <- CompressedOutputStream$create(fos, codec)
> write_feather(data, cos)
> cos$close()
> fos <- ReadableFile$create(filename)
> codec <- Codec$create("gzip")
> cos <- CompressedInputStream$create(fos, codec)
> read_feather(cos)
> {code}
> However, I can extract the file "x.gz" with
> {code:java}
> gzip -d x.gz
> {code}
> and then run in R:
> {code:java}
> fos <- ReadableFile$create("x")
> read_feather(fos);
>   c.1..2. c.3..4.
> 1       1       3
> 2       2       4
> {code}
> The codec gzip is available according to:
> {code:java}
> codec_is_available("gzip")
> [1] TRUE{code}
> Attached the generated "x.gz"
>  



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