Fokko commented on code in PR #6997:
URL: https://github.com/apache/iceberg/pull/6997#discussion_r1176816440


##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -358,14 +368,17 @@ def field(self, field: NestedField, field_result: 
pa.DataType) -> pa.Field:
             name=field.name,
             type=field_result,
             nullable=field.optional,
-            metadata={"doc": field.doc, "id": str(field.field_id)} if 
field.doc else {},
+            metadata={FIELD_DOC: field.doc, FIELD_ID: str(field.field_id)} if 
field.doc else {FIELD_ID: str(field.field_id)},
         )
 
-    def list(self, _: ListType, element_result: pa.DataType) -> pa.DataType:
-        return pa.list_(value_type=element_result)
+    def list(self, list_type: ListType, element_result: pa.DataType) -> 
pa.DataType:
+        element_field = self.field(list_type.element_field, element_result)
+        return pa.list_(value_type=element_field)

Review Comment:
   I just checked, and they accept a field. You can see it in the code itself: 
https://github.com/apache/arrow/blob/28c68128ba7fb9702ce9f02529f3d1de61ffeac1/python/pyarrow/types.pxi#L4339-L4350
   
   Create a PR to fix this: https://github.com/apache/arrow/pull/35336



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