liurenjie1024 commented on code in PR #46:
URL: https://github.com/apache/iceberg-rust/pull/46#discussion_r1309569245


##########
crates/iceberg/src/spec/schema.rs:
##########
@@ -705,6 +734,36 @@ mod tests {
     use crate::spec::schema::_serde::SchemaV2;
     use std::collections::HashMap;
 
+    fn check_schema_serde(json: &str, expected_type: Schema) {
+        let desered_type: Schema = serde_json::from_str(json).unwrap();
+        assert_eq!(desered_type, expected_type);
+
+        let sered_json = serde_json::to_string(&expected_type).unwrap();
+        assert_eq!(sered_json, json);
+        let parsed_json_value = 
serde_json::from_str::<Schema>(&sered_json).unwrap();
+
+        assert_eq!(parsed_json_value, desered_type);
+    }
+
+    #[test]
+    fn test_serde() {

Review Comment:
   Could we also add some test for v1 without `schema-id`?



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