comphead commented on code in PR #4930:
URL: https://github.com/apache/datafusion-comet/pull/4930#discussion_r3591708350
##########
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:
in this case we prob can just add GZIP variant into `CompressionCodec` and
reuse, however if we follow Apache Spark there are 2 enums indeed, for parquet
and internal compression like shuffle.
--
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]