Skip to content
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
c65a0a4
Remove scripts to tests rapidsmpf in separate jobs
mroeschke Feb 18, 2026
b7e9cce
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 18, 2026
96fe32c
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 18, 2026
8fb8b75
Ensure shuffle method is set to rapidsmpf
mroeschke Feb 18, 2026
7452bd8
Adjust some config tests
mroeschke Feb 18, 2026
4b9c5e7
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 19, 2026
e46518f
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 24, 2026
8623f22
Pass CUDF_POLARS__PARQUET_OPTIONS__USE_RAPIDSMPF_NATIVE
mroeschke Feb 24, 2026
fea7ee9
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 25, 2026
5556a7e
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Feb 26, 2026
6816244
Use small block size in unit tests
mroeschke Feb 26, 2026
e6a7f80
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 2, 2026
f10b5f5
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 3, 2026
e5223f5
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 4, 2026
a7a9c81
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 6, 2026
30294dd
Update test_log_query_plan after https://github.com/rapidsai/cudf/pul…
mroeschke Mar 6, 2026
8e9cbd2
Remove comment about dynamic planning
mroeschke Mar 6, 2026
2e30436
Fix shuffle fallback warning, check warning in test_grouped_rolling_u…
mroeschke Mar 6, 2026
b45dbd9
Try using threadpoolexecutor in contextmanager to fix resourcewarnings
mroeschke Mar 6, 2026
acaef66
Remove warning filter
mroeschke Mar 6, 2026
2cd190b
Make warning more generic
mroeschke Mar 6, 2026
8b08f62
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 6, 2026
f635088
Workaround xfail in test_merge_sorted_without_nulls
mroeschke Mar 6, 2026
eeef8e8
xfail the zero column, height tests for now
mroeschke Mar 7, 2026
aa8c67b
Add cudf_polars trace to test_python_other, preemtive import or skip …
mroeschke Mar 7, 2026
3c8eb10
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 7, 2026
63ecdae
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 9, 2026
c02cb36
Re-enable importorskip
mroeschke Mar 9, 2026
87ba76a
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 9, 2026
9318457
Start adding xfails to failing rapidsmpf tests
mroeschke Mar 10, 2026
1704866
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 10, 2026
202cca5
Change comments to echo for log
mroeschke Mar 10, 2026
415d5ea
Add xfails to test_groupby_sorted_keys
mroeschke Mar 10, 2026
ab95752
Missed 2 tests
mroeschke Mar 10, 2026
17f84a4
xfail tests in test_groupby with rapidsmpf
mroeschke Mar 10, 2026
151be46
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 10, 2026
a401aa3
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 10, 2026
35e2d15
Remove not expr condition
mroeschke Mar 10, 2026
70791cd
Change xfail nodes again, may need to skip due to unstable shuffling
mroeschke Mar 11, 2026
1cfcb2e
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 11, 2026
5da9dac
Mark test_groupby_sorted_keys as xfail strict=False
mroeschke Mar 11, 2026
916b164
xfail test_shift_by_expression_get
mroeschke Mar 11, 2026
0990377
xfail params of test_non_coalesce_join
mroeschke Mar 11, 2026
c6d598e
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 11, 2026
0b54d50
Revert xfails on test_shift_by_expression_get and test_non_coalesce_join
mroeschke Mar 11, 2026
c7b6d5d
xfail strict=False test_non_coalesce_join
mroeschke Mar 11, 2026
2056a38
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 11, 2026
54fe379
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 11, 2026
b29fc5e
Ensure rapidsmpf is installed in cudf_polars wheels tests
mroeschke Mar 11, 2026
4997229
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 12, 2026
26f0fe1
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 13, 2026
384f878
Fix shift not passing stream to_py
mroeschke Mar 13, 2026
01fa311
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 13, 2026
d2095ae
nocover a importerror, keep skipping test_groupby for older polars ve…
mroeschke Mar 13, 2026
9b28ea7
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 16, 2026
d74ba8b
Ignore coverage requirements for new job
mroeschke Mar 16, 2026
61bd956
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 16, 2026
1144a2a
Change more Rapidsmpf Shuffler.wait_on to Shuffler.wait
mroeschke Mar 16, 2026
609cf99
Pass df.stream to to_py call in shift
mroeschke Mar 16, 2026
d19b49f
Merge branch 'bug/cudf_polars/rmf_wait' into ci/cudf_polars/unit_test…
mroeschke Mar 16, 2026
7bb6520
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/unit…
mroeschke Mar 16, 2026
804cf3b
xfail test_groupby_aggs_keep_unsupported_as_null for quantile and pol…
mroeschke Mar 16, 2026
8f642f3
add temp? no coverage failure to dask tests
mroeschke Mar 16, 2026
35f91da
Undo ci script changes
mroeschke Mar 17, 2026
28d0c2c
Undo wheel specific changes
mroeschke Mar 17, 2026
adef645
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 17, 2026
5cff7f7
Skip test_groupby for rapidsmpf
mroeschke Mar 17, 2026
af3cc97
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 17, 2026
6c5d2b8
Try skipping more tests that segault
mroeschke Mar 17, 2026
8acf8e9
Ignore another test that segfaulted
mroeschke Mar 17, 2026
2d5019f
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 17, 2026
64e35bb
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 18, 2026
12a154f
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 18, 2026
0f4ec9e
Fix typo and add link to pytest.skip
mroeschke Mar 18, 2026
f1eff5f
Remove unneeded dependencies.yml change
mroeschke Mar 18, 2026
f754afc
Unset the shuffler env variable and revert tests sensitive to environ…
mroeschke Mar 18, 2026
2252824
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 20, 2026
c36c39b
test_grouped_rolling_unsorted_raises no longer UseWarnings
mroeschke Mar 20, 2026
545602c
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 23, 2026
eb816aa
Merge remote-tracking branch 'upstream/main' into ci/cudf_polars/cond…
mroeschke Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ci/run_cudf_polars_with_rapidsmpf_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cudf_polars/

# Run experimental tests with the "single" cluster mode and the "rapidsmpf" runtime
rapids-logger "Running experimental tests with the 'rapidsmpf' runtime and a 'single' cluster"
timeout 10m python -m pytest --cache-clear "$@" "tests/experimental" \
CUDF_POLARS__PARQUET_OPTIONS__USE_RAPIDSMPF_NATIVE=1 CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD=rapidsmpf timeout 10m python -m pytest --cache-clear "$@" tests \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm kind of annoying that all the cudf and pandas tests will run because of this change. Perhaps we can figure out how to avoid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we either need to:

  1. Specifically include cudf_polars, cudf, cudf.pandas etc. specific CI files in the changed files logic
  2. Convince folks to split the ci directory to be project specific e.g. python/cudf_polars/ci/, python/cudf/ci etc. (probably a larger ask)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you say why setting CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD was necessary? The default method should depend on the runtime

In [8]: import polars as pl
   ...: from cudf_polars.utils.config import ConfigOptions
   ...: 
   ...: 
   ...: engine = pl.GPUEngine(executor="streaming", executor_options={"runtime": "rapidsmpf"})
   ...: cfg = ConfigOptions.from_polars_engine(engine)
   ...: cfg.executor.shuffle_method
   ...: 
Out[8]: <ShuffleMethod._RAPIDSMPF_SINGLE: 'rapidsmpf-single'>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah fair point, I suppose I was trying to guarantee we would always use the rapidsmpf shuffler here (since there's logic for the distributed cluster falling back to the task shuffler), but I'll remove as it's not really necessary.

--executor streaming \
--cluster single \
--runtime rapidsmpf
--runtime rapidsmpf \
--blocksize-mode small

# Run experimental tests with the "distributed" cluster mode and the "rapidsmpf" runtime
rapids-logger "Running experimental tests with the 'rapidsmpf' runtime and a 'distributed' cluster"
Expand Down
2 changes: 2 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ files:
- depends_on_cudf_kafka
- depends_on_custreamz
- depends_on_cudf_polars
- depends_on_rapidsmpf
- cudf_polars_trace
test_java:
output: none
includes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0

"""Dask function registrations such as serializers and dispatch implementations."""
Expand Down Expand Up @@ -215,7 +215,7 @@ def _(x: DataFrame) -> int:
from rapidsmpf.integrations.dask.spilling import register_dask_serialize

register_dask_serialize() # pragma: no cover; rapidsmpf dependency not included yet
except ImportError:
except ImportError: # pragma: no cover
pass

# Register the tokenizer for NamedExpr and DataType. This is a performance
Expand Down
7 changes: 6 additions & 1 deletion python/cudf_polars/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

Expand Down Expand Up @@ -28,6 +28,11 @@ def clear_memory_resource_cache():
cudf_polars.callback.default_memory_resource.cache_clear()


@pytest.fixture
def using_rapidsmpf():
return cudf_polars.testing.asserts.DEFAULT_RUNTIME == "rapidsmpf"


def pytest_addoption(parser):
parser.addoption(
"--executor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@pytest.mark.skipif(DEFAULT_CLUSTER != "single", reason="Requires 'single' cluster.")
def test_structlog_streaming_node_events():
"""Test that structlog emits 'Streaming Actor' events when tracing is enabled."""
pytest.importorskip("structlog")
# Run in subprocess to control CUDF_POLARS_LOG_TRACES environment variable
code = textwrap.dedent("""\
import polars as pl
Expand Down
8 changes: 7 additions & 1 deletion python/cudf_polars/tests/expressions/test_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,13 @@ def test_implode_agg_unsupported():
assert_ir_translation_raises(q, NotImplementedError)


def test_decimal_aggs(decimal_df: pl.LazyFrame) -> None:
def test_decimal_aggs(decimal_df: pl.LazyFrame, using_rapidsmpf, request) -> None:
request.applymarker(
pytest.mark.xfail(
condition=using_rapidsmpf,
reason="https://github.com/rapidsai/cudf/issues/21645",
)
)
q = decimal_df.with_columns(
sum=pl.col("a").sum(),
min=pl.col("a").min(),
Expand Down
12 changes: 10 additions & 2 deletions python/cudf_polars/tests/expressions/test_booleanfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ def test_booleanfunction_all_any_kleene(expr, ignore_nulls):
)
@pytest.mark.parametrize("has_nans", [False, True], ids=["no_nans", "nans"])
def test_boolean_function_unary(
expr: Callable[[pl.Expr], pl.Expr], *, has_nans: bool, has_nulls: bool
expr: Callable[[pl.Expr], pl.Expr],
*,
has_nans: bool,
has_nulls: bool,
using_rapidsmpf: bool,
) -> None:
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
pytest.skip("Can segfault on 12.9 builds with rapidsmpf runtime.")

Do we have an issue tracking this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated the pytest.skips to fix the type and include the github link

values: list[float | None] = [1, 2, 3, 4, 5]
if has_nans:
values[3] = float("nan")
Expand Down Expand Up @@ -160,7 +166,9 @@ def test_boolean_isbetween(closed, bounds):
"expr", [pl.any_horizontal("*"), pl.all_horizontal("*")], ids=["any", "all"]
)
@pytest.mark.parametrize("wide", [False, True], ids=["narrow", "wide"])
def test_boolean_horizontal(expr, has_nulls, wide):
def test_boolean_horizontal(expr, has_nulls, wide, using_rapidsmpf):
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This typo occurs repeatedly.

Suggested change
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
pytest.skip("Can segfault on 12.9 builds with rapidsmpf runtime.")

ldf = pl.LazyFrame(
{
"a": [False, False, False, False, False, True],
Expand Down
8 changes: 7 additions & 1 deletion python/cudf_polars/tests/expressions/test_len.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ def test_len(dtype, empty):


@pytest.mark.parametrize("data", [[1, 2, 3], [1, 2, None]])
def test_col_len(data):
def test_col_len(data, using_rapidsmpf, request):
request.applymarker(
pytest.mark.xfail(
condition=using_rapidsmpf,
reason="https://github.com/rapidsai/cudf/issues/21645",
)
)
data = {"a": list("xyz"), "b": data}
q = pl.LazyFrame(data).select(
pl.col("a").len().alias("l"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ def test_string_zfill_forbidden_chars():
),
],
)
def test_string_pad_start(width, char):
def test_string_pad_start(width, char, using_rapidsmpf):
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
df = pl.LazyFrame({"a": ["abc", "defg", "hij"]})
q = df.select(pl.col("a").str.pad_start(width, char))
assert_gpu_result_equal(q)
Expand Down
12 changes: 11 additions & 1 deletion python/cudf_polars/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from __future__ import annotations

import os
import sys
from typing import Any, cast

Expand Down Expand Up @@ -381,8 +382,12 @@ def test_scheduler_deprecated() -> None:

def test_validate_shuffle_method_defaults(
*,
monkeypatch: pytest.MonkeyPatch,
rapidsmpf_distributed_available: bool,
) -> None:
# TODO: Can remove once removed from ci/run_cudf_polars_pytests.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think keeping this is fine. If possible, our tests should be robust to what's in the environment when the test process starts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just go ahead and revert this since I'll be removing the shuffler environment variable that affected the tests in this file.

# and the default shuffle method changes to "rapidsmpf"
monkeypatch.delenv("CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD", raising=False)
config = ConfigOptions.from_polars_engine(
pl.GPUEngine(
executor="streaming",
Expand Down Expand Up @@ -804,7 +809,12 @@ def test_cuda_stream_policy_from_env(
elif runtime == "rapidsmpf":
with pytest.raises(ValueError, match="The rapidsmpf streaming engine"):
ConfigOptions.from_polars_engine(engine)
else:
elif (
os.environ.get("CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD", "") != "rapidsmpf"
and not rapidsmpf_single_available
):
# CUDF_POLARS__EXECUTOR__SHUFFLE_METHOD set in ci/run_cudf_polars_pytests.sh
# Would raise since rapidsmpf shuffle requires rapidsmpf to be installed
config = ConfigOptions.from_polars_engine(engine)
assert config.cuda_stream_policy == env

Expand Down
8 changes: 7 additions & 1 deletion python/cudf_polars/tests/test_dataframescan.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ def test_dataframescan_with_decimals():
POLARS_VERSION_LT_138,
reason="height parameter added in Polars 1.38",
)
def test_dataframescan_zero_width_with_rows():
def test_dataframescan_zero_width_with_rows(request, using_rapidsmpf):
request.applymarker(
pytest.mark.xfail(
using_rapidsmpf,
reason="https://github.com/rapidsai/cudf/issues/21644",
)
)
df = pl.LazyFrame(height=5)
q = df.select(pl.len())
assert_gpu_result_equal(q)
Expand Down
10 changes: 9 additions & 1 deletion python/cudf_polars/tests/test_drop_nulls.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ def test_drop_null(null_data):
[0, pl.col("a").mean(), pl.col("b")],
ids=["scalar", "aggregation", "column_expression"],
)
def test_fill_null(null_data, value):
def test_fill_null(null_data, value, using_rapidsmpf, request):
request.applymarker(
pytest.mark.xfail(
condition=using_rapidsmpf
and "mean" in str(value)
and len(null_data.collect()) == 2,
reason="https://github.com/rapidsai/cudf/issues/21721",
)
)
q = null_data.select(pl.col("a").fill_null(value))
assert_gpu_result_equal(q)

Expand Down
37 changes: 35 additions & 2 deletions python/cudf_polars/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,33 @@ def maintain_order(request):
return request.param


def test_groupby(df: pl.LazyFrame, maintain_order, keys, exprs):
def test_groupby(
df: pl.LazyFrame, maintain_order, keys, exprs, using_rapidsmpf, request
):
if using_rapidsmpf:
pytest.skip("Can segault on 12.9 builds with rapidsmpf runtime.")
failing_rapidsmpf_nodeids = {
'test_groupby[maintain_order-col("key1")-col("int32").mean()]',
'test_groupby[maintain_order-col("key1")-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-col("key2")-col("int32").mean()]',
'test_groupby[maintain_order-col("key2")-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-col("key1")-dyn int: 1-col("int32").mean()]',
'test_groupby[maintain_order-col("key1")-dyn int: 1-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-[(col("key1")) * (col("key2"))]-col("int32").mean()]',
'test_groupby[maintain_order-[(col("key1")) * (col("key2"))]-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-col("key1")-col("key2")-col("int32").mean()]',
'test_groupby[maintain_order-col("key1")-col("key2")-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-[(col("key1")) == (col("key2"))]-col("int32").mean()]',
'test_groupby[maintain_order-[(col("key1")) == (col("key2"))]-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
'test_groupby[maintain_order-col("key2")-[(col("key1")) == (1)]-col("int32").mean()]',
'test_groupby[maintain_order-col("key2")-[(col("key1")) == (1)]-col("uint16_with_null").sum()-col("uint16_with_null").mean().alias("mean")]',
}
request.applymarker(
pytest.mark.xfail(
using_rapidsmpf and request.node.name in failing_rapidsmpf_nodeids,
reason="https://github.com/rapidsai/cudf/issues/21642 and probably mean calculation referenced in https://github.com/rapidsai/cudf/issues/21721",
)
)
q = df.group_by(*keys, maintain_order=maintain_order).agg(*exprs)

if not maintain_order:
Expand All @@ -136,7 +162,14 @@ def test_groupby(df: pl.LazyFrame, maintain_order, keys, exprs):
assert_gpu_result_equal(q, check_exact=False)


def test_groupby_sorted_keys(df: pl.LazyFrame, keys, exprs):
def test_groupby_sorted_keys(df: pl.LazyFrame, keys, exprs, using_rapidsmpf, request):
request.applymarker(
pytest.mark.xfail(
using_rapidsmpf,
strict=False,
reason="https://github.com/rapidsai/cudf/issues/21642 - no deterministic sort for keys",
)
)
sorted_keys = [
key.sort(descending=descending)
for key, descending in zip(keys, itertools.cycle([False, True]))
Expand Down
11 changes: 10 additions & 1 deletion python/cudf_polars/tests/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,16 @@ def test_join_maintain_order(left, right, maintain_order):
["c", "a"],
],
)
def test_non_coalesce_join(left, right, how, nulls_equal, join_expr):
def test_non_coalesce_join(
left, right, how, nulls_equal, join_expr, using_rapidsmpf, request
):
request.applymarker(
pytest.mark.xfail(
using_rapidsmpf,
strict=False,
reason="Non deterministic sort/join on nulls",
)
)
query = left.join(
right, on=join_expr, how=how, nulls_equal=nulls_equal, coalesce=False
)
Expand Down
21 changes: 9 additions & 12 deletions python/cudf_polars/tests/test_merge_sorted.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

Expand All @@ -9,17 +9,14 @@
from cudf_polars.testing.asserts import assert_gpu_result_equal


@pytest.mark.parametrize(
"descending",
[
pytest.param(
True,
marks=pytest.mark.xfail(reason="polars/issues/21511"),
),
False,
],
)
def test_merge_sorted_without_nulls(descending):
@pytest.mark.parametrize("descending", [True, False])
def test_merge_sorted_without_nulls(descending, request, using_rapidsmpf):
request.applymarker(
pytest.mark.xfail(
not using_rapidsmpf and descending,
reason="https://github.com/pola-rs/polars/issues/21511",
)
)
df0 = pl.LazyFrame(
{"name": ["steve", "elise", "bob"], "age": [42, 44, 18], "height": [5, 6, 5]}
).sort("age", descending=descending)
Expand Down
17 changes: 15 additions & 2 deletions python/cudf_polars/tests/test_rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from __future__ import annotations

import contextlib
from datetime import datetime

import pytest
Expand Down Expand Up @@ -133,7 +134,7 @@ def test_grouped_rolling():
assert_gpu_result_equal(q)


def test_grouped_rolling_unsorted_raises():
def test_grouped_rolling_unsorted_raises(using_rapidsmpf):
df = pl.LazyFrame(
{
"keys": [1, None, 2, 1, 2, None],
Expand All @@ -145,7 +146,19 @@ def test_grouped_rolling_unsorted_raises():

with pytest.raises(pl.exceptions.ComputeError):
q.collect(engine="in-memory")
with pytest.raises(RuntimeError, match="Input for grouped rolling is not sorted"):

fallback_warning = (
pytest.warns(
UserWarning,
match="shuffle_method=rapidsmpf-single does not support maintain_order=True",
)
if using_rapidsmpf
else contextlib.nullcontext()
)
with (
pytest.raises(RuntimeError, match="Input for grouped rolling is not sorted"),
fallback_warning,
):
q.collect(engine=pl.GPUEngine(raise_on_fail=True))


Expand Down
8 changes: 7 additions & 1 deletion python/cudf_polars/tests/test_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,13 @@ def test_scan_tiny_file_not_compressed(tmp_path):
reason="height parameter added in Polars 1.38",
)
@pytest.mark.parametrize("engine", [None, NO_CHUNK_ENGINE])
def test_scan_parquet_zero_width_with_limit(tmp_path, engine):
def test_scan_parquet_zero_width_with_limit(tmp_path, engine, request, using_rapidsmpf):
request.applymarker(
pytest.mark.xfail(
using_rapidsmpf and engine is None,
reason="https://github.com/rapidsai/cudf/issues/21644",
)
)
path = tmp_path / "zero_width.parquet"
pl.LazyFrame(height=20).sink_parquet(path)
q = pl.scan_parquet(path).head(5)
Expand Down
8 changes: 7 additions & 1 deletion python/cudf_polars/tests/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ def test_select_with_cse_no_agg():
assert_gpu_result_equal(query)


def test_select_with_cse_with_agg():
def test_select_with_cse_with_agg(using_rapidsmpf, request):
request.applymarker(
pytest.mark.xfail(
condition=using_rapidsmpf,
reason="https://github.com/rapidsai/cudf/issues/21645",
)
)
df = pl.LazyFrame({"a": [1, 2, 3]})
expr = pl.col("a") + pl.col("a")
asum = pl.col("a").sum() + pl.col("a").sum()
Expand Down
8 changes: 4 additions & 4 deletions python/cudf_polars/tests/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def test_log_query_plan() -> None:
[sys.executable, "-c", code], env=env, stderr=subprocess.STDOUT
)

# Check for Query Plan event
# Check for Query Plan event generated from SerializablePlan
assert b"Query Plan" in result
assert b"scope=plan" in result or b"'scope': 'plan'" in result
assert b"ir_id" in result
assert b"ir_type" in result
assert b"children_ir_ids" in result
assert b"actor_ir_id" in result
assert b"actor_ir_type" in result
assert b"children" in result
Loading