kevinjqliu commented on code in PR #4296:
URL: https://github.com/apache/iceberg-python/pull/4296#discussion_r4515760012


##########
pyiceberg/avro/file.py:
##########
@@ -88,11 +88,10 @@ def compression_codec(self) -> type[Codec] | None:
         """Get the file's compression codec algorithm from the file's metadata.
 
         In the case of a null codec, we return a None indicating that we
-        don't need to compress/decompress.
+        don't need to compress/decompress. A file without the avro.codec
+        entry is uncompressed: the Avro specification makes "null" the default.
         """
-        from pyiceberg.table import TableProperties
-
-        codec_name = self.meta.get(AVRO_CODEC_KEY, 
TableProperties.WRITE_AVRO_COMPRESSION_DEFAULT)
+        codec_name = self.meta.get(AVRO_CODEC_KEY, "null")

Review Comment:
   👍 
   
   
   reference: 
   https://avro.apache.org/docs/1.12.0/specification/#null
   
   <img width="786" height="272" alt="Image" 
src="https://github.com/user-attachments/assets/3b4b9494-20ef-43a1-987f-8c07e8bd5336";
 />



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