kevinjqliu commented on issue #290: URL: https://github.com/apache/iceberg-python/issues/290#issuecomment-1904513996
Thank you @HonahX In https://github.com/apache/iceberg-python/pull/289 I reimplemented `_commit_table` with `update_table_metadata` and still got the problem above. It looks like the real culprit was the difference between the `update_schema()...commit()` and `CommitTableRequest (... AddSchemaUpdate(schema=...))` Just like you mentioned, `update_schema()...commit()` actually increments the `schema_id` but `CommitTableRequest (... AddSchemaUpdate(schema=...))` assumes that the passed in schema's `schema_id` is already incremented. Therefore the fix for `test_commit_table` is just to instantiate the schema with `schema-id=1`. Pulling your comment out of the [InMemory Catalog PR ](https://github.com/apache/iceberg-python/pull/289#discussion_r1461380205) ``` The AddSchemaUpdate should contain a schema with changes applied and schema-id incremented. In pyiceberg, we trust update_schema API to give us the correct one, as I mentioned in this https://github.com/apache/iceberg-python/issues/290#issuecomment-1903304501. Since this PR already updated the _commit_table for InMemory Catalog, I think we do not need to increment the schema-id here ``` -- 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