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

Neal Richardson updated ARROW-16612:
------------------------------------
    Summary: [R] Support inferring compression from filename for all 
readers/writers  (was: [R] parquet files with compression extensions should use 
parquet writer for compression)

> [R] Support inferring compression from filename for all readers/writers
> -----------------------------------------------------------------------
>
>                 Key: ARROW-16612
>                 URL: https://issues.apache.org/jira/browse/ARROW-16612
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 8.0.0
>            Reporter: Sam Albers
>            Assignee: Neal Richardson
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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. 
> {code:java}
> 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"{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to