kevinjqliu commented on code in PR #1867: URL: https://github.com/apache/iceberg-python/pull/1867#discussion_r2021692558
########## pyiceberg/io/pyarrow.py: ########## @@ -1777,7 +1777,7 @@ def struct( field_arrays.append(array) fields.append(self._construct_field(field, array.type)) elif field.optional: - arrow_type = schema_to_pyarrow(field.field_type, include_field_ids=False) + arrow_type = schema_to_pyarrow(field.field_type, include_field_ids=self._include_field_ids) Review Comment: ah!! i tried to resolve it by passing the schema's name mapping https://github.com/apache/iceberg-python/compare/main...kevinjqliu:iceberg-python:kevinjqliu/use-name-mapping?expand=1#diff-8d5e63f2a87ead8cebe2fd8ac5dcf2198d229f01e16bb9e06e21f7277c328abdR1655 ########## pyiceberg/io/pyarrow.py: ########## @@ -1777,7 +1777,7 @@ def struct( field_arrays.append(array) fields.append(self._construct_field(field, array.type)) elif field.optional: - arrow_type = schema_to_pyarrow(field.field_type, include_field_ids=False) + arrow_type = schema_to_pyarrow(field.field_type, include_field_ids=self._include_field_ids) Review Comment: ah!! i think this is the right approach i tried to resolve it by passing the schema's name mapping https://github.com/apache/iceberg-python/compare/main...kevinjqliu:iceberg-python:kevinjqliu/use-name-mapping?expand=1#diff-8d5e63f2a87ead8cebe2fd8ac5dcf2198d229f01e16bb9e06e21f7277c328abdR1655 -- 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