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


##########
crates/iceberg/src/avro/schema.rs:
##########
@@ -557,22 +649,19 @@ mod tests {
         AvroSchema::parse_str(input.as_str()).unwrap()
     }
 
-    fn check_schema_conversion(
-        avro_schema: AvroSchema,
-        expected_iceberg_schema: Schema,
-        check_avro_to_iceberg: bool,
-    ) {
-        if check_avro_to_iceberg {
-            let converted_iceberg_schema = 
avro_schema_to_schema(&avro_schema).unwrap();
-            assert_eq!(expected_iceberg_schema, converted_iceberg_schema);
-        }
+    fn check_schema_conversion(avro_schema: AvroSchema, 
expected_iceberg_schema: Schema) {
+        let converted_iceberg_schema = 
avro_schema_to_schema(&avro_schema).unwrap();
+        assert_eq!(expected_iceberg_schema, converted_iceberg_schema);
 
         let converted_avro_schema = schema_to_avro_schema(
             avro_schema.name().unwrap().fullname(Namespace::None),
             &expected_iceberg_schema,
         )
         .unwrap();
         assert_eq!(avro_schema, converted_avro_schema);
+
+        let converted_converted_iceberg_schema = 
avro_schema_to_schema(&avro_schema).unwrap();

Review Comment:
   ```suggestion
           let converted_converted_iceberg_schema = 
avro_schema_to_schema(&converted_avro_schema).unwrap();
   ```
   
   I guess we should use `converted_avro_schema` here?



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