Skip to content

Commit

Permalink
add MRE test
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Dec 20, 2024
1 parent 16d660b commit 08d86af
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions py-polars/tests/unit/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2710,3 +2710,22 @@ def test_boolean_slice_pushdown_20314() -> None:

f.seek(0)
assert pl.scan_parquet(f).slice(2, 1).collect().item()


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)

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)
.collect()
)

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

0 comments on commit 08d86af

Please sign in to comment.