Skip to content

Commit

Permalink
chore(datafusion): xfail on broken filter calls
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed May 31, 2024
1 parent b46d206 commit 6f2e1be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ibis/backends/datafusion/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import pandas.testing as tm
import pytest
from packaging.version import parse as vparse

import ibis.expr.datatypes as dt
import ibis.expr.types as ir
from ibis import udf
from ibis.legacy.udf.vectorized import elementwise, reduction

pytest.importorskip("datafusion")
datafusion = pytest.importorskip("datafusion")
pc = pytest.importorskip("pyarrow.compute")

with pytest.warns(FutureWarning, match="v9.0"):
Expand Down Expand Up @@ -68,6 +69,10 @@ def median(a: float) -> float:
assert result == con.tables.batting.G.execute().median()


@pytest.mark.xfail(
condition=vparse(datafusion.__version__) == vparse("38.0.1"),
reason="internal error about MEDIAN(G) naming",
)
def test_builtin_agg_udf_filtered(con):
@udf.agg.builtin
def median(a: float, where: bool = True) -> float:
Expand Down
5 changes: 5 additions & 0 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,11 @@ def test_quantile(
raises=PsycoPg2InternalError,
reason="function covar_pop(integer, integer) does not exist",
),
pytest.mark.xfail_version(
datafusion=["datafusion==38.0.1"],
reason="datafusion FILTER syntax seems broken",
strict=False, # passes with no filter condition
),
],
),
param(
Expand Down
3 changes: 3 additions & 0 deletions ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,9 @@ def test_pivot_longer(backend):
assert len(res.execute()) == len(expected)


@pytest.mark.xfail_version(
datafusion=["datafusion==38.0.1"], reason="internal error about MEDIAN(G) naming"
)
def test_pivot_wider(backend):
diamonds = backend.diamonds
expr = (
Expand Down

0 comments on commit 6f2e1be

Please sign in to comment.