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


##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -461,9 +461,57 @@ impl TableMetadata {
         file_io: &FileIO,
         metadata_location: impl AsRef<str>,
     ) -> Result<()> {
+        use std::io::Write as _;
+
+        use flate2::write::GzEncoder;
+
+        let json_data = serde_json::to_vec(self)?;
+
+        // Check if compression is enabled via table properties
+        let codec = self
+            .properties
+            
.get(crate::spec::table_properties::TableProperties::PROPERTY_METADATA_COMPRESSION_CODEC)
+            .map(|s| s.as_str())
+            
.unwrap_or(crate::spec::table_properties::TableProperties::PROPERTY_METADATA_COMPRESSION_CODEC_DEFAULT);
+
+        let (data_to_write, actual_location) = match codec {
+            "gzip" => {

Review Comment:
   yeah, meant to add this, I didn't think I rerequested you the review but 
thanks for being proactive.  This is now added 



##########
crates/iceberg/src/transaction/snapshot.rs:
##########
@@ -410,6 +444,7 @@ impl<'a> SnapshotProducer<'a> {
                 self.table.metadata().current_snapshot_id(),
                 next_seq_num,
                 Some(first_row_id),
+                compression,

Review Comment:
   clone is not needed.



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