Skip to content

Commit

Permalink
Revert "Fix a few errors with upstream pandas and pyarrow (dask#10412)"
Browse files Browse the repository at this point in the history
This reverts commit fb5c215.
  • Loading branch information
phofl committed Jul 24, 2023
1 parent fb5c215 commit 02dcbd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
15 changes: 5 additions & 10 deletions dask/dataframe/io/tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2424,15 +2424,13 @@ def test_append_cat_fp(tmpdir, engine):
pytest.param(
pd.DataFrame({"x": [3, 2, 1]}).astype("M8[us]"),
marks=pytest.mark.xfail(
PANDAS_GT_200 and pyarrow_version < parse_version("13.0.0.dev"),
reason="https://github.com/apache/arrow/issues/15079",
PANDAS_GT_200, reason="https://github.com/apache/arrow/issues/15079"
),
),
pytest.param(
pd.DataFrame({"x": [3, 2, 1]}).astype("M8[ms]"),
marks=pytest.mark.xfail(
PANDAS_GT_200 and pyarrow_version < parse_version("13.0.0.dev"),
reason="https://github.com/apache/arrow/issues/15079",
PANDAS_GT_200, reason="https://github.com/apache/arrow/issues/15079"
),
),
pd.DataFrame({"x": [3, 2, 1]}).astype("uint16"),
Expand Down Expand Up @@ -3373,13 +3371,10 @@ def test_pandas_timestamp_overflow_pyarrow(tmpdir):
table, f"{tmpdir}/file.parquet", use_deprecated_int96_timestamps=False
)

if pyarrow_version < parse_version("13.0.0.dev"):
# This will raise by default due to overflow
with pytest.raises(pa.lib.ArrowInvalid) as e:
dd.read_parquet(str(tmpdir), engine="pyarrow").compute()
assert "out of bounds" in str(e.value)
else:
# This will raise by default due to overflow
with pytest.raises(pa.lib.ArrowInvalid) as e:
dd.read_parquet(str(tmpdir), engine="pyarrow").compute()
assert "out of bounds" in str(e.value)

from dask.dataframe.io.parquet.arrow import ArrowDatasetEngine as ArrowEngine

Expand Down
3 changes: 1 addition & 2 deletions dask/dataframe/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -3563,8 +3563,7 @@ def test_groupby_numeric_only_supported(func, numeric_only):
# Make sure dask and pandas raise the same error message
# We raise the error on _meta_nonempty, actual element may differ
ctx = pytest.raises(
TypeError,
match="Cannot convert|could not convert|does not support|agg function failed",
TypeError, match="Cannot convert|could not convert|does not support"
)
successful_compute = False

Expand Down

0 comments on commit 02dcbd6

Please sign in to comment.