Sam Albers created ARROW-16612: ---------------------------------- Summary: parquet files with compression extensions should use parquet writer for compression 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
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.7#820007)