Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8615

[R] Error better and insist on RandomAccessFile in read_feather

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.16.0, 0.17.0
    • 1.0.0
    • R

    Description

      The use of read_feather function with CompressedInputStream fails with the error:

       

      Error in ipc___feather___Reader__Open(file) : 
       Invalid: File is too small to be a well-formed file
      

      The minimal code to get it:

      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)
      

      However, I can extract the file "x.gz" with

      gzip -d x.gz
      

      and then run in R:

      fos <- ReadableFile$create("x")
      read_feather(fos);
        c.1..2. c.3..4.
      1       1       3
      2       2       4
      

      The codec gzip is available according to:

      codec_is_available("gzip")
      [1] TRUE

      Attached the generated "x.gz"

       

      Attachments

        1. x.gz
          0.3 kB
          Lucas Nesi

        Issue Links

          Activity

            People

              npr Neal Richardson
              llnn Lucas Nesi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h