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

[R] Fix compression inference from filename

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0
    • 9.0.0
    • R

    Description

      Right now arrow will silently write a file with a .gz extension to CompressedOutputStream rather than passing the compression option to the parquet writer itself. The internal detect_compression() function detects the extension and that is what passes it off incorrectly. However it only fails at the read_parquet stage which could lead to confusion.

      library(arrow, warn.conflicts = FALSE) 
      tf <- tempfile(fileext = ".parquet.gz") 
      write_parquet(data.frame(x = 1:5), tf, compression = "gzip", compression_level = 5) read_parquet(tf) 
      #> Error: file must be a "RandomAccessFile"

      Attachments

        Issue Links

          Activity

            People

              npr Neal Richardson
              boshek Sam Albers
              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 - 1h 40m
                  1h 40m