Skip to content

Commit

Permalink
Fix polars for 1.2.1 (#16316)
Browse files Browse the repository at this point in the history
I think Polars made a breaking change in a patch release.
At least the error we're getting looks like the error from
pola-rs/polars#17606.

Authors:
  - Thomas Li (https://github.com/lithomas1)

Approvers:
  - Lawrence Mitchell (https://github.com/wence-)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #16316
  • Loading branch information
lithomas1 authored Jul 19, 2024
1 parent 3df4ac2 commit 18f5fe0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/cudf_polars/cudf_polars/utils/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
POLARS_VERSION_GE_10 = POLARS_VERSION >= parse("1.0")
POLARS_VERSION_GE_11 = POLARS_VERSION >= parse("1.1")
POLARS_VERSION_GE_12 = POLARS_VERSION >= parse("1.2")
POLARS_VERSION_GE_121 = POLARS_VERSION >= parse("1.2.1")
POLARS_VERSION_GT_10 = POLARS_VERSION > parse("1.0")
POLARS_VERSION_GT_11 = POLARS_VERSION > parse("1.1")
POLARS_VERSION_GT_12 = POLARS_VERSION > parse("1.2")
Expand Down
13 changes: 12 additions & 1 deletion python/cudf_polars/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,18 @@ def test_groupby_nan_minmax_raises(op):
assert_ir_translation_raises(q, NotImplementedError)


@pytest.mark.parametrize("key", [1, pl.col("key1")])
@pytest.mark.parametrize(
"key",
[
pytest.param(
1,
marks=pytest.mark.xfail(
versions.POLARS_VERSION_GE_121, reason="polars 1.2.1 disallows this"
),
),
pl.col("key1"),
],
)
@pytest.mark.parametrize(
"expr",
[
Expand Down

0 comments on commit 18f5fe0

Please sign in to comment.