Skip to content

Commit 6d772b9

Browse files
committed
test: separate test_upsert_with_nulls_in_join_columns
1 parent 9af1b3d commit 6d772b9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tests/table/test_upsert.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,20 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
780780
schema=schema,
781781
)
782782

783+
784+
def test_upsert_with_nulls_in_join_columns(catalog: Catalog) -> None:
785+
identifier = "default.test_upsert_with_nulls_in_join_columns"
786+
_drop_table(catalog, identifier)
787+
788+
schema = pa.schema(
789+
[
790+
("foo", pa.string()),
791+
("bar", pa.int32()),
792+
("baz", pa.bool_()),
793+
]
794+
)
795+
table = catalog.create_table(identifier, schema)
796+
783797
# upsert table with null value
784798
data_with_null = pa.Table.from_pylist(
785799
[
@@ -793,8 +807,6 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
793807
assert table.scan().to_arrow() == pa.Table.from_pylist(
794808
[
795809
{"foo": None, "bar": 1, "baz": False},
796-
{"foo": "apple", "bar": 7, "baz": False},
797-
{"foo": "banana", "bar": None, "baz": False},
798810
],
799811
schema=schema,
800812
)
@@ -814,8 +826,6 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
814826
[
815827
{"foo": "lemon", "bar": None, "baz": False},
816828
{"foo": None, "bar": 1, "baz": True},
817-
{"foo": "apple", "bar": 7, "baz": False},
818-
{"foo": "banana", "bar": None, "baz": False},
819829
],
820830
schema=schema,
821831
)

0 commit comments

Comments
 (0)