Skip to content

Commit 57f95e1

Browse files
committed
test: separate test_upsert_with_nulls_in_join_columns
1 parent 96247c9 commit 57f95e1

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
@@ -783,6 +783,20 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
783783
schema=schema,
784784
)
785785

786+
787+
def test_upsert_with_nulls_in_join_columns(catalog: Catalog) -> None:
788+
identifier = "default.test_upsert_with_nulls_in_join_columns"
789+
_drop_table(catalog, identifier)
790+
791+
schema = pa.schema(
792+
[
793+
("foo", pa.string()),
794+
("bar", pa.int32()),
795+
("baz", pa.bool_()),
796+
]
797+
)
798+
table = catalog.create_table(identifier, schema)
799+
786800
# upsert table with null value
787801
data_with_null = pa.Table.from_pylist(
788802
[
@@ -796,8 +810,6 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
796810
assert table.scan().to_arrow() == pa.Table.from_pylist(
797811
[
798812
{"foo": None, "bar": 1, "baz": False},
799-
{"foo": "apple", "bar": 7, "baz": False},
800-
{"foo": "banana", "bar": None, "baz": False},
801813
],
802814
schema=schema,
803815
)
@@ -817,8 +829,6 @@ def test_upsert_with_nulls(catalog: Catalog) -> None:
817829
[
818830
{"foo": "lemon", "bar": None, "baz": False},
819831
{"foo": None, "bar": 1, "baz": True},
820-
{"foo": "apple", "bar": 7, "baz": False},
821-
{"foo": "banana", "bar": None, "baz": False},
822832
],
823833
schema=schema,
824834
)

0 commit comments

Comments
 (0)