c-thiel commented on code in PR #799:
URL: https://github.com/apache/iceberg-rust/pull/799#discussion_r1884798642


##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -158,11 +160,15 @@ pub struct TableMetadata {
     /// writers, but is not used when reading because reads use the specs
     /// stored in manifest files.
     pub(crate) default_sort_order_id: i64,
-    ///A map of snapshot references. The map keys are the unique snapshot 
reference
+    /// A map of snapshot references. The map keys are the unique snapshot 
reference
     /// names in the table, and the map values are snapshot reference objects.
     /// There is always a main branch reference pointing to the 
current-snapshot-id
     /// even if the refs map is null.
     pub(crate) refs: HashMap<String, SnapshotReference>,
+    /// Mapping of snapshot ids to statistics files.
+    pub(crate) statistics: HashMap<i64, StatisticsFile>,

Review Comment:
   Can we ever have more than one `StatisticsFile` for a `snapshot_id`?
   In java this is modeled as a mapping `snapshot_id` : `Vec<StatisticsFile>`, 
however I couldn't find a way to get more than one element into the `Vec` for a 
`snapshot_id` other than deserializing.
   
https://github.com/apache/iceberg/blob/540d6a6251e31b232fe6ed2413680621454d107a/core/src/main/java/org/apache/iceberg/TableMetadata.java#L1310-L1320



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to