Skip to content

Commit e0b8fbc

Browse files
Backport PR pandas-dev#34804 on branch 1.0.x (TST: ensure read_parquet filter argument is correctly passed though (pyarrow engine)) (pandas-dev#34807)
Co-authored-by: Joris Van den Bossche <[email protected]>
1 parent 281f178 commit e0b8fbc

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
@@ -591,6 +591,17 @@ def test_additional_extension_types(self, pa):
591591
)
592592
check_round_trip(df, pa)
593593

594+
@td.skip_if_no("pyarrow", min_version="0.17")
595+
def test_filter_row_groups(self, pa):
596+
# https://github.com/pandas-dev/pandas/issues/26551
597+
df = pd.DataFrame({"a": list(range(0, 3))})
598+
with tm.ensure_clean() as path:
599+
df.to_parquet(path, pa)
600+
result = read_parquet(
601+
path, pa, filters=[("a", "==", 0)], use_legacy_dataset=False
602+
)
603+
assert len(result) == 1
604+
594605

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

0 commit comments

Comments
 (0)