milesgranger commented on code in PR #13921:
URL: https://github.com/apache/arrow/pull/13921#discussion_r952248476


##########
python/pyarrow/io.pxi:
##########
@@ -1964,7 +1980,9 @@ cdef class Codec(_Weakrefable):
     @property
     def compression_level(self):
         """Returns the compression level parameter of the codec"""
-        return frombytes(self.unwrap().compression_level())
+        if self.name == 'snappy':
+            return None
+        return self.unwrap().compression_level()

Review Comment:
   Good point, it was failing as-is, `compression_level() -> int` and 
`frombytes` would fail trying to decode an int. Also modified snappy variant as 
that has no compression level and would invalid integer.



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