Xuanwo commented on code in PR #531:
URL: https://github.com/apache/iceberg-rust/pull/531#discussion_r1709412928


##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -649,178 +649,106 @@ mod tests {
     use super::*;
     use crate::spec::Schema;
 
+    /**

Review Comment:
   Please use `///` for doc comments.



##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -649,178 +649,106 @@ mod tests {
     use super::*;
     use crate::spec::Schema;
 
+    /**
+     * Create a simple field with metadata.
+     */
+    fn simple_field(name: &str, ty: DataType, nullable: bool, value: &str) -> 
Field {
+        Field::new(name, ty, nullable).with_metadata(HashMap::from([(
+            PARQUET_FIELD_ID_META_KEY.to_string(),
+            value.to_string(),
+        )]))
+    }
+
     fn arrow_schema_for_arrow_schema_to_schema_test() -> ArrowSchema {
         let fields = Fields::from(vec![
-            Field::new("key", DataType::Int32, 
false).with_metadata(HashMap::from([(
-                PARQUET_FIELD_ID_META_KEY.to_string(),
-                "17".to_string(),
-            )])),
-            Field::new("value", DataType::Utf8, 
true).with_metadata(HashMap::from([(
-                PARQUET_FIELD_ID_META_KEY.to_string(),
-                "18".to_string(),
-            )])),
+            simple_field("key", DataType::Int32, false, "17"),

Review Comment:
   Hi @liurenjie1024, do you think it's a singal for us to refine the public 
API for `Field` along with parquet 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