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

[R] Cannot write parquet to OutputStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.15.1
    • 0.16.0
    • R

    Description

      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')

      Attachments

        Issue Links

          Activity

            People

              Skowron Bob
              Skowron Bob
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 50m
                  50m