Skip to content

Commit

Permalink
xfail conditional join test in polars < 1.13
Browse files Browse the repository at this point in the history
Polars doesn't deliver a complete predicate IR due to
pola-rs/polars#19597.
  • Loading branch information
wence- committed Nov 6, 2024
1 parent 46cde31 commit 8cfb3e2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions python/cudf_polars/tests/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
assert_gpu_result_equal,
assert_ir_translation_raises,
)
from cudf_polars.utils.versions import POLARS_VERSION_LT_112
from cudf_polars.utils.versions import POLARS_VERSION_LT_112, POLARS_VERSION_LT_113


@pytest.fixture(params=[False, True], ids=["nulls_not_equal", "nulls_equal"])
Expand Down Expand Up @@ -110,7 +110,11 @@ def test_cross_join(left, right, zlice):


@pytest.mark.parametrize(
"left_on,right_on", [(pl.col("a"), pl.lit(2)), (pl.lit(2), pl.col("a"))]
"left_on,right_on",
[
(pl.col("a"), pl.lit(2, dtype=pl.Int64)),
(pl.lit(2, dtype=pl.Int64), pl.col("a")),
],
)
def test_join_literal_key_unsupported(left, right, left_on, right_on):
q = left.join(right, left_on=left_on, right_on=right_on, how="inner")
Expand All @@ -125,7 +129,13 @@ def test_join_literal_key_unsupported(left, right, left_on, right_on):
[pl.col("a_right") <= pl.col("a") * 2],
[pl.col("b") * 2 > pl.col("a_right"), pl.col("a") == pl.col("c_right")],
[pl.col("b") * 2 <= pl.col("a_right"), pl.col("a") < pl.col("c_right")],
[pl.col("b") <= pl.col("a_right") * 7, pl.col("a") < pl.col("d") * 2],
pytest.param(
[pl.col("b") <= pl.col("a_right") * 7, pl.col("a") < pl.col("d") * 2],
marks=pytest.mark.xfail(
POLARS_VERSION_LT_113,
reason="https://github.com/pola-rs/polars/issues/19597",
),
),
],
)
def test_join_where(left, right, conditions, zlice):
Expand Down

0 comments on commit 8cfb3e2

Please sign in to comment.