Skip to content

Commit 2931a3f

Browse files
committed
test: add test case for create_match_filter without null
1 parent 9aed557 commit 2931a3f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/table/test_upsert.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ def test_create_match_filter_single_condition() -> None:
444444
@pytest.mark.parametrize(
445445
"data, expected",
446446
[
447+
pytest.param(
448+
[{"x": 1.0}, {"x": 2.0}, {"x": 3.0}],
449+
In(Reference(name="x"), {DoubleLiteral(1.0), DoubleLiteral(2.0), DoubleLiteral(3.0)}),
450+
id="single-column-without-null",
451+
),
447452
pytest.param(
448453
[{"x": 1.0}, {"x": 2.0}, {"x": None}, {"x": 4.0}, {"x": float("nan")}],
449454
Or(
@@ -453,7 +458,7 @@ def test_create_match_filter_single_condition() -> None:
453458
right=In(Reference(name="x"), {DoubleLiteral(1.0), DoubleLiteral(2.0), DoubleLiteral(4.0)}),
454459
),
455460
),
456-
id="single-column",
461+
id="single-column-with-null",
457462
),
458463
pytest.param(
459464
[
@@ -491,11 +496,11 @@ def test_create_match_filter_single_condition() -> None:
491496
),
492497
),
493498
),
494-
id="multi-column",
499+
id="multi-column-with-null",
495500
),
496501
],
497502
)
498-
def test_create_match_filter_with_nulls(data: list[dict[str, Any]], expected: BooleanExpression) -> None:
503+
def test_create_match_filter(data: list[dict[str, Any]], expected: BooleanExpression) -> None:
499504
schema = pa.schema([pa.field("x", pa.float64()), pa.field("y", pa.float64())])
500505
table = pa.Table.from_pylist(data, schema=schema)
501506
join_cols = sorted({col for record in data for col in record})

0 commit comments

Comments
 (0)