Fokko commented on issue #674: URL: https://github.com/apache/iceberg-python/issues/674#issuecomment-2143994414
Hey @kevinjqliu Thanks for following up here, however, I don't think that https://github.com/apache/iceberg-python/pull/700 is the appropriate fix. Instead, we should re-order the fields based on the table schema. I think we're quite close to that. The `to_requested_schema` will do this for us: https://github.com/apache/iceberg-python/blob/31c6c23d428a3237589ebada2b4cd64bf37b1aef/pyiceberg/io/pyarrow.py#L1796 I think we should do two things: - Remove the conditionality of that if-statement and just take the cost of running the visitor (I didn't like that one in the first place :). This will put the fields in the same order as the table schema when writing (otherwise they will be adjusted when reading). - Fix the compatibility checker that we allow for out-of-order. I think checking if the required fields are in there is sufficient. WDYT? -- 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