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


##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -561,15 +557,13 @@ def struct(
         fields: List[pa.Field] = []
         for field, field_array in zip(struct.fields, field_results):
             if field_array is not None:
-                array = self.cast_if_needed(field, field_array)
+                array = self._cast_if_needed(field, field_array)
                 field_arrays.append(array)
                 fields.append(pa.field(field.name, array.type, field.optional))
-            elif field.optional:

Review Comment:
   This check is done in the `check_schema_compatibility`



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