Skip to content

Commit c4ef23f

Browse files
committed
test(dask): enable a bunch of sorting related now-xpassing tests
1 parent 9f190eb commit c4ef23f

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

ibis/backends/dask/tests/test_operations.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
import numpy.testing as npt
88
import pandas as pd
99
import pytest
10+
from packaging.version import parse as vparse
1011
from pytest import param
1112

1213
import ibis
1314
import ibis.expr.datatypes as dt
1415

16+
dask = pytest.importorskip("dask")
1517
da = pytest.importorskip("dask.array")
1618
dd = pytest.importorskip("dask.dataframe")
1719

@@ -446,7 +448,10 @@ def test_series_limit(t, df, offset):
446448
)
447449

448450

449-
@pytest.mark.xfail(reason="TODO - sorting - #2553")
451+
@pytest.mark.xfail(
452+
condition=vparse(dask.__version__) < vparse("2024.2.0"),
453+
reason="not implemented until 2024.2.0",
454+
)
450455
def test_complex_order_by(t, df):
451456
expr = t.order_by([ibis.desc(t.plain_int64 * t.plain_float64), t.plain_float64])
452457
result = expr.compile()

ibis/backends/tests/test_aggregation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ def test_group_concat_over_window(backend, con):
15941594
backend.assert_frame_equal(result, expected)
15951595

15961596

1597-
@pytest.mark.notimpl(["dask"], raises=NotImplementedError)
1597+
@pytest.mark.xfail_version(dask=["dask<2024.2.0"])
15981598
def test_value_counts_on_expr(backend, alltypes, df):
15991599
expr = alltypes.bigint_col.add(1).value_counts()
16001600
columns = expr.columns

ibis/backends/tests/test_generic.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,12 @@ def test_select_sort_sort(alltypes):
537537
param(
538538
["id", "int_col"],
539539
{"by": ["id", "int_col"]},
540-
marks=pytest.mark.notimpl(["dask"]),
540+
marks=pytest.mark.xfail_version(dask=["dask<2024.2.0"]),
541541
),
542542
param(
543543
["id", ibis.desc("int_col")],
544544
{"by": ["id", "int_col"], "ascending": [True, False]},
545-
marks=pytest.mark.notimpl(["dask"]),
545+
marks=pytest.mark.xfail_version(dask=["dask<2024.2.0"]),
546546
),
547547
],
548548
)
@@ -849,13 +849,13 @@ def test_typeof(con):
849849
@pytest.mark.notyet(["impala"], reason="can't find table in subquery")
850850
@pytest.mark.notimpl(["datafusion", "druid"])
851851
@pytest.mark.notimpl(["pyspark"], condition=is_older_than("pyspark", "3.5.0"))
852-
@pytest.mark.notyet(["dask"], reason="not supported by the backend")
853852
@pytest.mark.notyet(["exasol"], raises=ExaQueryError, reason="not supported by exasol")
854853
@pytest.mark.broken(
855854
["risingwave"],
856855
raises=PsycoPg2InternalError,
857856
reason="https://github.com/risingwavelabs/risingwave/issues/1343",
858857
)
858+
@pytest.mark.xfail_version(dask=["dask<2024.2.0"])
859859
def test_isin_uncorrelated(
860860
backend, batting, awards_players, batting_df, awards_players_df
861861
):
@@ -876,7 +876,9 @@ def test_isin_uncorrelated(
876876

877877
@pytest.mark.broken(["polars"], reason="incorrect answer")
878878
@pytest.mark.notimpl(["druid"])
879-
@pytest.mark.notyet(["dask"], reason="not supported by the backend")
879+
@pytest.mark.xfail_version(
880+
dask=["dask<2024.2.0"], reason="not supported by the backend"
881+
)
880882
def test_isin_uncorrelated_filter(
881883
backend, batting, awards_players, batting_df, awards_players_df
882884
):

0 commit comments

Comments
 (0)