Skip to content

Commit

Permalink
Turn query planning off
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Apr 17, 2024
1 parent 59486c7 commit df20bcc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fastparquet/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def test_sorted_row_group_columns(tempdir):

def test_sorted_row_group_columns_with_filters(tempdir):
# fails up to 2021.08.1
dask = pytest.importorskip('dask')
dd = pytest.importorskip('dask.dataframe')
# create dummy dataframe
df = pd.DataFrame({'unique': [0, 0, 1, 1, 2, 2, 3, 3],
Expand All @@ -140,11 +141,12 @@ def test_sorted_row_group_columns_with_filters(tempdir):
'id1', 'id2',
'id1', 'id2']},
index=[0, 0, 1, 1, 2, 2, 3, 3])
df = dd.from_pandas(df, npartitions=2)
fn = os.path.join(tempdir, 'foo.parquet')
df.to_parquet(fn,
engine='fastparquet',
partition_on=['id'])
with dask.config.set({"dataframe.query-planning": False}):
df = dd.from_pandas(df, npartitions=2)
fn = os.path.join(tempdir, 'foo.parquet')
df.to_parquet(fn,
engine='fastparquet',
partition_on=['id'])
# load ParquetFile
pf = ParquetFile(fn)
filters = [('id', '==', 'id1')]
Expand Down

0 comments on commit df20bcc

Please sign in to comment.