Skip to content

Commit 1c6f544

Browse files
TST: ensure read_parquet filter argument is correctly passed though (pyarrow engine) (#34804)
1 parent ed1f7aa commit 1c6f544

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pandas/tests/io/test_parquet.py

+11
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,17 @@ def test_timestamp_nanoseconds(self, pa):
671671
df = pd.DataFrame({"a": pd.date_range("2017-01-01", freq="1n", periods=10)})
672672
check_round_trip(df, pa, write_kwargs={"version": "2.0"})
673673

674+
@td.skip_if_no("pyarrow", min_version="0.17")
675+
def test_filter_row_groups(self, pa):
676+
# https://github.com/pandas-dev/pandas/issues/26551
677+
df = pd.DataFrame({"a": list(range(0, 3))})
678+
with tm.ensure_clean() as path:
679+
df.to_parquet(path, pa)
680+
result = read_parquet(
681+
path, pa, filters=[("a", "==", 0)], use_legacy_dataset=False
682+
)
683+
assert len(result) == 1
684+
674685

675686
class TestParquetFastParquet(Base):
676687
@td.skip_if_no("fastparquet", min_version="0.3.2")

0 commit comments

Comments
 (0)