Skip to content

Commit

Permalink
test(dask): enable a bunch of sorting related now-xpassing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Feb 18, 2024
1 parent 9f190eb commit c4ef23f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 6 additions & 1 deletion ibis/backends/dask/tests/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
import numpy.testing as npt
import pandas as pd
import pytest
from packaging.version import parse as vparse
from pytest import param

import ibis
import ibis.expr.datatypes as dt

dask = pytest.importorskip("dask")
da = pytest.importorskip("dask.array")
dd = pytest.importorskip("dask.dataframe")

Expand Down Expand Up @@ -446,7 +448,10 @@ def test_series_limit(t, df, offset):
)


@pytest.mark.xfail(reason="TODO - sorting - #2553")
@pytest.mark.xfail(
condition=vparse(dask.__version__) < vparse("2024.2.0"),
reason="not implemented until 2024.2.0",
)
def test_complex_order_by(t, df):
expr = t.order_by([ibis.desc(t.plain_int64 * t.plain_float64), t.plain_float64])
result = expr.compile()
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ def test_group_concat_over_window(backend, con):
backend.assert_frame_equal(result, expected)


@pytest.mark.notimpl(["dask"], raises=NotImplementedError)
@pytest.mark.xfail_version(dask=["dask<2024.2.0"])
def test_value_counts_on_expr(backend, alltypes, df):
expr = alltypes.bigint_col.add(1).value_counts()
columns = expr.columns
Expand Down
10 changes: 6 additions & 4 deletions ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,12 @@ def test_select_sort_sort(alltypes):
param(
["id", "int_col"],
{"by": ["id", "int_col"]},
marks=pytest.mark.notimpl(["dask"]),
marks=pytest.mark.xfail_version(dask=["dask<2024.2.0"]),
),
param(
["id", ibis.desc("int_col")],
{"by": ["id", "int_col"], "ascending": [True, False]},
marks=pytest.mark.notimpl(["dask"]),
marks=pytest.mark.xfail_version(dask=["dask<2024.2.0"]),
),
],
)
Expand Down Expand Up @@ -849,13 +849,13 @@ def test_typeof(con):
@pytest.mark.notyet(["impala"], reason="can't find table in subquery")
@pytest.mark.notimpl(["datafusion", "druid"])
@pytest.mark.notimpl(["pyspark"], condition=is_older_than("pyspark", "3.5.0"))
@pytest.mark.notyet(["dask"], reason="not supported by the backend")
@pytest.mark.notyet(["exasol"], raises=ExaQueryError, reason="not supported by exasol")
@pytest.mark.broken(
["risingwave"],
raises=PsycoPg2InternalError,
reason="https://github.com/risingwavelabs/risingwave/issues/1343",
)
@pytest.mark.xfail_version(dask=["dask<2024.2.0"])
def test_isin_uncorrelated(
backend, batting, awards_players, batting_df, awards_players_df
):
Expand All @@ -876,7 +876,9 @@ def test_isin_uncorrelated(

@pytest.mark.broken(["polars"], reason="incorrect answer")
@pytest.mark.notimpl(["druid"])
@pytest.mark.notyet(["dask"], reason="not supported by the backend")
@pytest.mark.xfail_version(
dask=["dask<2024.2.0"], reason="not supported by the backend"
)
def test_isin_uncorrelated_filter(
backend, batting, awards_players, batting_df, awards_players_df
):
Expand Down

0 comments on commit c4ef23f

Please sign in to comment.