andygrove opened a new issue, #11545: URL: https://github.com/apache/arrow-rs/issues/11545
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** `parquet::basic::ZstdLevel::try_new` accepts only levels 1 to 22 (`MINIMUM_LEVEL = 1`, `MAXIMUM_LEVEL = 22` in `parquet/src/compression.rs`). zstd itself also accepts: - level `0`, which means its default level (`ZSTD_CLEVEL_DEFAULT`, 3) - negative "fast" levels, down to `ZSTD_minCLevel()`, which trade compression ratio for speed parquet-java (through zstd-jni) accepts both, so a writer that wants to honor a table's configured zstd level cannot do so with parquet-rs. Apache Iceberg tables, for example, can set `write.parquet.compression-level` to `0` or a negative value, and iceberg-java writes them; DataFusion Comet's native Iceberg writer has to fall back to the JVM writer for those tables. **Describe the solution you'd like** Let `ZstdLevel` accept the full range the linked zstd library supports (`zstd::compression_level_range()`), including 0 and negative levels, and pass them through to the encoder unchanged. **Describe alternatives you've considered** Callers can map 0 to 3 themselves, but there is no equivalent for the negative levels. **Additional context** `compression_level_range()` is not `const`, which is presumably why the bounds are hard-coded today. -- 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]
