kevinjqliu commented on issue #2825: URL: https://github.com/apache/iceberg-python/issues/2825#issuecomment-3796944163
There are 2 types of schemas here, Iceberg schema and Arrow schema. `pyarrow_to_schema` translates Arrow schema to Iceberg schema. This function requires the Arrow schema to have field ids https://github.com/apache/iceberg-python/blob/a26fca71b14e5cb757e4d500ebf6bd207302e802/pyiceberg/io/pyarrow.py#L1119-L1138 You can try `_pyarrow_to_schema_without_ids` as seen here https://github.com/apache/iceberg-python/blob/a26fca71b14e5cb757e4d500ebf6bd207302e802/pyiceberg/io/pyarrow.py#L2719-L2734 Note, `_check_pyarrow_schema_compatible` and `_check_schema_compatible` has most of the logic for your use case -- 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]
