jdockerty commented on code in PR #1116:
URL: https://github.com/apache/iceberg-rust/pull/1116#discussion_r2025155007
##########
crates/iceberg/src/spec/name_mapping.rs:
##########
@@ -33,12 +48,38 @@ pub struct NameMapping {
#[serde(rename_all = "kebab-case")]
pub struct MappedField {
#[serde(skip_serializing_if = "Option::is_none")]
- pub field_id: Option<i32>,
- pub names: Vec<String>,
+ field_id: Option<i32>,
+ names: Vec<String>,
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
#[serde_as(deserialize_as = "DefaultOnNull")]
- pub fields: Vec<MappedField>,
+ fields: Vec<MappedField>,
Review Comment:
@liurenjie1024 I've been taking another look at this again, although
including `#[serde(transparent)]` onto the structure doesn't seem to produce
the right value as it isn't a struct that contains _only_ an internal `Vec`,
since `MappedFields` contains other fields/state too.
Do you mind elaborating more on this? As I don't quite understand how to
stop the field being serialised incorrectly when this is altered.
--
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]