jdockerty commented on code in PR #1299: URL: https://github.com/apache/iceberg-rust/pull/1299#discussion_r2079179261
########## crates/iceberg/src/spec/name_mapping/mod.rs: ########## @@ -55,7 +96,7 @@ pub struct MappedField { #[serde(default)] #[serde(skip_serializing_if = "Vec::is_empty")] #[serde_as(deserialize_as = "DefaultOnNull")] - fields: Vec<Arc<MappedField>>, + fields: Vec<MappedField>, Review Comment: The reasoning for this was for being cheaply cloneable from what I understood, since this can be a heavily nested field. Original thread is [here](https://github.com/apache/iceberg-rust/pull/1116#discussion_r2046801281). ########## crates/iceberg/src/spec/name_mapping/mod.rs: ########## @@ -179,44 +393,48 @@ mod tests { #[test] fn test_json_name_mapping_deserialization() { let name_mapping = r#" - [ { - "field-id": 1, - "names": [ - "id", - "record_id" - ] - }, - { - "field-id": 2, - "names": [ - "data" - ] - }, - { - "field-id": 3, - "names": [ - "location" - ], - "fields": [ + "root": [ Review Comment: From what I understood, this JSON shouldn't change (`root` field and inclusion of the mappings below), which can be achieved using the `serde(skip)` derive too. Although, I'll defer to someone more with a lot more experience of the iceberg project too here :smile: -- 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