You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Lucas Nesi (Jira)" <ji...@apache.org> on 2020/04/28 15:28:00 UTC

[jira] [Created] (ARROW-8615) read_feather with CompressedInputStream fail

Lucas Nesi created ARROW-8615:
---------------------------------

             Summary: read_feather with CompressedInputStream fail
                 Key: ARROW-8615
                 URL: https://issues.apache.org/jira/browse/ARROW-8615
             Project: Apache Arrow
          Issue Type: Bug
          Components: R
    Affects Versions: 0.17.0, 0.16.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
         Attachments: x.gz

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)