Skip to content

Commit 3013bdb

Browse files
committed
fix test_commit_table
1 parent e2541ac commit 3013bdb

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
@@ -407,6 +407,7 @@ def test_commit_table(catalog: InMemoryCatalog) -> None:
407407
NestedField(2, "y", LongType(), doc="comment"),
408408
NestedField(3, "z", LongType()),
409409
NestedField(4, "add", LongType()),
410+
schema_id=1,
410411
)
411412

412413
# When
@@ -422,8 +423,10 @@ def test_commit_table(catalog: InMemoryCatalog) -> None:
422423

423424
# Then
424425
assert response.metadata.table_uuid == given_table.metadata.table_uuid
425-
assert len(response.metadata.schemas) == 1
426-
assert response.metadata.schemas[0] == new_schema
426+
assert given_table.metadata.current_schema_id == 1
427+
assert len(response.metadata.schemas) == 2
428+
assert response.metadata.schemas[1] == new_schema.model_copy(update={"schema_id": 1})
429+
assert given_table.metadata.last_column_id == new_schema.highest_field_id
427430

428431

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

0 commit comments

Comments
 (0)