Expose set_data_page_v2_compression_ratio_threshold for Parquet
- Vorherrschende Sprache
- Rust
- Sterne
- 9.3k
- Forks
- 2.4k
- Ø Merge
- 3 T. 11 Std.
- Gemergte PRs (30 T.)
- 360
Beschreibung
### Is your feature request related to a problem or challenge?
Writing Parquet V2 can benefit from [set_data_page_v2_compression_ratio_threshold](https://docs.rs/parquet/58.3.0/parquet/file/properties/struct.WriterPropertiesBuilder.html#method.set_data_page_v2_compression_ratio_threshold), which is not exposed in Datafusion.
### Describe the solution you'd like
Expose `data_page_compression_ratio_threshold` on `datafusion_common::config::ParquetOptions` and `ParquetColumnOptions` so it can be passed along to `WriterPropertiesBuilder`.
This primarily enables `datafusion_datasource_parquet::file_format::ParquetFormat` to use this setting.
### Describe alternatives you've considered
We are evaluating if we should always disable compression for sorted delta-encoded columns. This can easily be done with `ParquetColumnOptions.compression` today.
We can also create a wrapper `ParquetSink` to set more options on the `WriterPropertiesBuilder` but that's quite a painful workaround for little gain.
### Additional context
We experience poor compression ratios (<5%) with Zstd for delta-encoded columns of timestamps and other types. Disabling compression with a threshold would be ideal to avoid the decompression overhead at query time.
Beitragsleitfaden
Rechercherichtung
Beginne mit datafusion_common::config::ParquetOptions und ParquetColumnOptions und verfolge dann, wie datafusion_datasource_parquet::file_format::ParquetFormat den WriterPropertiesBuilder erstellt. Prüfe die verlinkte parquet API auf set_data_page_v2_compression_ratio_threshold; abgeschlossen ist die Aufgabe, wenn die Option verfügbar gemacht und weitergereicht wird, sodass das Schreiben von Parquet V2 den konfigurierten Schwellenwert anwenden kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- data-engineering
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100