mbutrovich commented on code in PR #1802:
URL: https://github.com/apache/iceberg-rust/pull/1802#discussion_r2475920538


##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -413,9 +415,20 @@ impl TableMetadata {
         file_io: &FileIO,
         metadata_location: impl AsRef<str>,
     ) -> Result<TableMetadata> {
-        let input_file = file_io.new_input(metadata_location)?;
+        let input_file = file_io.new_input(metadata_location.as_ref())?;
         let metadata_content = input_file.read().await?;
-        let metadata = 
serde_json::from_slice::<TableMetadata>(&metadata_content)?;
+
+        let metadata = if 
metadata_location.as_ref().ends_with(".gz.metadata.json") {

Review Comment:
   > Even better would be peeking at the file and looking for the gzip magic 
number. If there's interest in that I can implement it.
   
   That would be a really elegant solution, I think.



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