Skip to content

Commit 9944896

Browse files
committed
fix test_commit_table
1 parent 76f9999 commit 9944896

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/catalog/test_base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ def test_commit_table(catalog: InMemoryCatalog) -> None:
377377
NestedField(2, "y", LongType(), doc="comment"),
378378
NestedField(3, "z", LongType()),
379379
NestedField(4, "add", LongType()),
380+
schema_id=1,
380381
)
381382

382383
# When
@@ -392,8 +393,10 @@ def test_commit_table(catalog: InMemoryCatalog) -> None:
392393

393394
# Then
394395
assert response.metadata.table_uuid == given_table.metadata.table_uuid
395-
assert len(response.metadata.schemas) == 1
396-
assert response.metadata.schemas[0] == new_schema
396+
assert given_table.metadata.current_schema_id == 1
397+
assert len(response.metadata.schemas) == 2
398+
assert response.metadata.schemas[1] == new_schema.model_copy(update={"schema_id": 1})
399+
assert given_table.metadata.last_column_id == new_schema.highest_field_id
397400

398401

399402
def test_add_column(catalog: InMemoryCatalog) -> None:

0 commit comments

Comments
 (0)