Skip to content

Commit

Permalink
update MRE test
Browse files Browse the repository at this point in the history
  • Loading branch information
codesorcery committed Dec 20, 2024
1 parent 08d86af commit ae28fd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py-polars/tests/unit/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2716,16 +2716,16 @@ def test_allow_missing_columns_predicate_pushdown_20361() -> None:
f1 = io.BytesIO()
f2 = io.BytesIO()

pl.DataFrame({"a": [1], "b": [1]}).write_parquet(f1)
pl.DataFrame({"a": [1]}).write_parquet(f2)
pl.DataFrame({"a": [1, 2], "b": [1, 3], "c": [False, False]}).write_parquet(f1)
pl.DataFrame({"a": [4, 5], "c": [True, False]}).write_parquet(f2)

f1.seek(0)
f2.seek(0)

df = (
pl.scan_parquet([f1, f2], allow_missing_columns=True) # type: ignore[arg-type]
.filter(pl.col.a == pl.col.b)
.filter((pl.col.a == pl.col.b) | pl.col.c)
.collect()
)

assert_frame_equal(df, pl.DataFrame({"a": [1, 1], "b": [1, None]}))
assert_frame_equal(df, pl.DataFrame({"a": [1, 4], "b": [1, None], "c": [False, True]}))

0 comments on commit ae28fd2

Please sign in to comment.