ZENOTME commented on code in PR #795:
URL: https://github.com/apache/iceberg-rust/pull/795#discussion_r1884873126


##########
crates/iceberg/src/spec/values.rs:
##########
@@ -3439,11 +3443,13 @@ mod tests {
                     "bar".to_string(),
                 ))),
                 None,
+                Some(Literal::Primitive(PrimitiveLiteral::Int(1000))),
             ])),
             &Type::Struct(StructType::new(vec![
                 NestedField::required(2, "id", 
Type::Primitive(PrimitiveType::Int)).into(),
                 NestedField::optional(3, "name", 
Type::Primitive(PrimitiveType::String)).into(),
                 NestedField::optional(4, "address", 
Type::Primitive(PrimitiveType::String)).into(),
+                NestedField::required(5, "extra", 
Type::Primitive(PrimitiveType::Int)).into(),

Review Comment:
   I have found the reason why this can pass originally: the avro writer will 
ensure the record order according to the schema: 
https://github.com/apache/avro-rs/blob/390a150bfc5999eb852c9c0ef40335612f1407b5/avro/src/encode.rs#L247.
   
   However, if we serialize into other formats, e.g. json, the order can't be 
guaranteed. 



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