HonahX commented on code in PR #227:
URL: https://github.com/apache/iceberg-python/pull/227#discussion_r1433377086


##########
tests/io/test_pyarrow_visitor.py:
##########
@@ -209,9 +209,9 @@ def test_pyarrow_variable_binary_to_iceberg() -> None:
 def test_pyarrow_struct_to_iceberg() -> None:
     pyarrow_struct = pa.struct(
         [
-            pa.field("foo", pa.string(), nullable=True, metadata={"field_id": 
"1", "doc": "foo doc"}),
-            pa.field("bar", pa.int32(), nullable=False, metadata={"field_id": 
"2"}),
-            pa.field("baz", pa.bool_(), nullable=True, metadata={"field_id": 
"3"}),
+            pa.field("foo", pa.string(), nullable=True, 
metadata={b"PARQUET:field_id": "1", "doc": "foo doc"}),

Review Comment:
   ```suggestion
               pa.field("foo", pa.string(), nullable=True, 
metadata={"PARQUET:field_id": "1", "doc": "foo doc"}),
   ```
   Shall we make everything in metadata dict regular string (or byte string) 
for consistency? I think both regular and byte string can result in correct 
arrow field metadata.



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