emkornfield commented on code in PR #1851:
URL: https://github.com/apache/iceberg-rust/pull/1851#discussion_r2550513121


##########
crates/iceberg/src/spec/table_properties.rs:
##########
@@ -175,6 +196,19 @@ impl TryFrom<&HashMap<String, String>> for TableProperties 
{
                 TableProperties::PROPERTY_WRITE_TARGET_FILE_SIZE_BYTES,
                 TableProperties::PROPERTY_WRITE_TARGET_FILE_SIZE_BYTES_DEFAULT,
             )?,
+            avro_compression_codec: parse_property(
+                props,
+                TableProperties::PROPERTY_AVRO_COMPRESSION_CODEC,
+                
TableProperties::PROPERTY_AVRO_COMPRESSION_CODEC_DEFAULT.to_string(),
+            )?,
+            avro_compression_level: {
+                let level = parse_property(
+                    props,
+                    TableProperties::PROPERTY_AVRO_COMPRESSION_LEVEL,
+                    255u8,
+                )?;
+                if level == 255 { None } else { Some(level) }
+            },

Review Comment:
   I might be misunderstanding the comment.  But  I should have cleaned up `pub 
const PROPERTY_AVRO_COMPRESSION_LEVEL_DEFAULT: Option<u8> = None`;, I don't 
think it is used anymore.
   
   In a prior revision I added a method (`parse_optional_property`) that could 
return  `None` value directly but @liurenjie1024 questioned whether this was 
useful.



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