alamb commented on code in PR #6271:
URL: https://github.com/apache/arrow-rs/pull/6271#discussion_r1722228696


##########
parquet/src/basic.rs:
##########
@@ -358,6 +358,14 @@ pub enum Compression {
     LZ4_RAW,
 }
 
+impl Compression {
+    /// Returns the codec type of this compression setting as a string, 
without the compression
+    /// level.
+    pub(crate) fn codec_to_string(self) -> String {
+        format!("{:?}", self).split('(').next().unwrap().to_owned()

Review Comment:
   It would be nice to avoid panic'ing here if there is no `(` in the string -- 
I think this will panic if it is called on `CompressionLevel::UNCOMPRESSED` for 
example



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

Reply via email to