zakariya-s commented on code in PR #2887:
URL: https://github.com/apache/iceberg-rust/pull/2887#discussion_r3646169572
##########
crates/iceberg/src/spec/table_properties.rs:
##########
@@ -317,6 +353,36 @@ impl TableProperties {
/// Default matches `parquet::file::properties::DEFAULT_CDC_NORM_LEVEL`.
pub const PROPERTY_PARQUET_CDC_NORM_LEVEL_DEFAULT: i32 = 0;
+ /// Compression codec for Parquet data files (e.g. `zstd`, `gzip`,
`snappy`,
+ /// `lz4`, `brotli`, `uncompressed`). The codec name is validated when the
+ /// writer is built, not when properties are parsed.
+ pub const PROPERTY_PARQUET_COMPRESSION_CODEC: &str =
"write.parquet.compression-codec";
+ /// Default Parquet compression codec (matches Iceberg's default since
1.4.0).
+ pub const PROPERTY_PARQUET_COMPRESSION_CODEC_DEFAULT: &str = "zstd";
Review Comment:
On the matter of inconsistency, there are other places where arrow-rs has
different defaults to parquet-java, like the compression level for zstd too:
- [Defaults to 1 for
Rust](https://github.com/apache/arrow-rs/blob/f7dfcd25aabeb01641fe4b6c35ab964fdf0b24aa/parquet/src/compression.rs#L598-L602)
- [Defaults to 3 for
Java](https://github.com/apache/parquet-java/blob/83c2c80d49c57b1ae180df45229ee01dbceddc1e/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/ZstandardCodec.java#L52)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]