[
https://issues.apache.org/jira/browse/ARROW-17008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563959#comment-17563959
]
Charlie Gao commented on ARROW-17008:
-------------------------------------
Sure - the same file generated using Spark (sparklyr 1.7.7, spark 3.2.1):
[https://github.com/shikokuchuo/wip/raw/main/spark.parquet]
Output of parquet-tools - strangely enough it is showing 0% in this case as
well, but the file size is 4.0MB vs 4.6MB for the Arrow version.
{noformat}
############ file meta data ############
created_by: parquet-mr version 1.12.2 (build
77e30c8093386ec52c3cfa6c34b7ef3321322c94)
num_columns: 1
num_rows: 1000000
num_row_groups: 1
format_version: 1.0
serialized_size: 395
############ Columns ############
x
############ Column(x) ############
name: x
path: x
max_definition_level: 1
max_repetition_level: 0
physical_type: INT32
logical_type: None
converted_type (legacy): NONE
compression: SNAPPY (space_saved: -0%)
{noformat}
> [R] Parquet Snappy Compression Fails for Integer Type Data
> ----------------------------------------------------------
>
> Key: ARROW-17008
> URL: https://issues.apache.org/jira/browse/ARROW-17008
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Affects Versions: 8.0.0
> Environment: R4.2.1 Ubuntu 22.04 x86_64
> R4.1.2 Ubuntu 22.04 Aarch64
> Reporter: Charlie Gao
> Priority: Major
>
> Snappy compression is not working when writing to parquet for integer type
> data.
> E.g. compare file sizes for:
> {code:r}
> write_parquet(data.frame(x = 1:1e6), "snappy.parquet", compression = "snappy")
> write_parquet(data.frame(x = 1:1e6), "uncomp.parquet", compression =
> "uncompressed")
> {code}
> whereas for double:
> {code:r}
> write_parquet(data.frame(x = as.double(1:1e6)), "snappyd.parquet",
> compression = "snappy")
> write_parquet(data.frame(x = as.double(1:1e6)), "uncompd.parquet",
> compression = "uncompressed")
> {code}
> I have inspected the integer files using parquet-tools and compression level
> shows as 0%. Needless to say, I can achieve compression using Spark
> (sparklyr) etc.
> Thanks.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)