HonahX commented on code in PR #498: URL: https://github.com/apache/iceberg-python/pull/498#discussion_r1525837679
########## tests/integration/test_writes.py: ########## @@ -632,6 +632,60 @@ def test_write_and_evolve(session_catalog: Catalog, format_version: int) -> None snapshot_update.append_data_file(data_file) +@pytest.mark.integration +@pytest.mark.parametrize("format_version", [2]) +def test_create_table_transaction(session_catalog: Catalog, format_version: int) -> None: + if format_version == 1: + pytest.skip( + "There is a bug in the REST catalog (maybe server side) that prevents create and commit a staged version 1 table" Review Comment: My initial guess is that [CatalogHandler](https://github.com/apache/iceberg/blob/f19643a93f5dac99bbdbc9881ef19c89d7bcd3eb/core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java#L336-L342) use the default values to build the initial empty metadata. But the default format-version is now [2](https://github.com/apache/iceberg/blob/6e21bbf4c4cd2c8351a64636f91d05d00492dff2/core/src/main/java/org/apache/iceberg/TableMetadata.java#L911) so it's impossible for the server to build v1 metadata in this case. I remembered that `iceberg-rest` used the CatalogHandler to wrap the SqlCatalog. I will double-check that this weekend and do more tests -- 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