From 99448960caffa3b93f0e7cfc5fd187bf2804a8fb Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Mon, 22 Jan 2024 09:29:18 -0800 Subject: [PATCH] fix test_commit_table --- tests/catalog/test_base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/catalog/test_base.py b/tests/catalog/test_base.py index 2f29c0e772..e582af7d1d 100644 --- a/tests/catalog/test_base.py +++ b/tests/catalog/test_base.py @@ -377,6 +377,7 @@ def test_commit_table(catalog: InMemoryCatalog) -> None: NestedField(2, "y", LongType(), doc="comment"), NestedField(3, "z", LongType()), NestedField(4, "add", LongType()), + schema_id=1, ) # When @@ -392,8 +393,10 @@ def test_commit_table(catalog: InMemoryCatalog) -> None: # Then assert response.metadata.table_uuid == given_table.metadata.table_uuid - assert len(response.metadata.schemas) == 1 - assert response.metadata.schemas[0] == new_schema + assert given_table.metadata.current_schema_id == 1 + assert len(response.metadata.schemas) == 2 + assert response.metadata.schemas[1] == new_schema.model_copy(update={"schema_id": 1}) + assert given_table.metadata.last_column_id == new_schema.highest_field_id def test_add_column(catalog: InMemoryCatalog) -> None: