andygrove commented on code in PR #4930:
URL: https://github.com/apache/datafusion-comet/pull/4930#discussion_r3590591431


##########
native/core/src/execution/operators/parquet_writer.rs:
##########
@@ -52,11 +51,37 @@ use datafusion::{
 use futures::TryStreamExt;
 use parquet::{
     arrow::ArrowWriter,
-    basic::{Compression, ZstdLevel},
+    basic::{Compression, GzipLevel, ZstdLevel},
     file::properties::WriterProperties,
 };
 use url::Url;
 
+/// Compression codecs supported by the native Parquet writer.
+///
+/// This is deliberately separate from the shuffle `CompressionCodec`: gzip is 
a valid Parquet
+/// codec but is not a codec we compress shuffle blocks with.
+#[derive(Debug, Clone, PartialEq)]
+pub enum ParquetCompression {
+    None,
+    Snappy,
+    Lz4,
+    Zstd(i32),
+    Gzip,
+}
+
+impl ParquetCompression {

Review Comment:
   From the PR description:
   
   "Give the native Parquet writer its own ParquetCompression enum instead of 
borrowing the shuffle crate's CompressionCodec. gzip is a Parquet codec, not a 
shuffle codec, and the shuffle path has no business carrying it."



-- 
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]

Reply via email to