[FEA] Support rolling-by expressions inside ``over()`` in cuDF-Polars
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Grouped rolling-by expressions inside `over(...)` are not currently supported by cudf-polars. We should add both in-memory and streaming support for this expression family.
This issue should cover the common `rolling_*_by(...).over(...)` variants:
- [ ] `rolling_sum_by(...).over(...)`
- [ ] `rolling_mean_by(...).over(...)`
- [ ] `rolling_min_by(...).over(...)`
- [ ] `rolling_max_by(...).over(...)`
**Example**
```python
def test_rolling_sum_by_over(engine: GPUEngine) -> None:
"""``rolling_sum_by(...).over(...)``.
Status
------
- In-memory NOT supported
- Streaming NOT supported
"""
lf = pl.LazyFrame(
{
"g": ["A", "A", "A", "B", "B"],
"ts": [
"2025-01-01 09:00:00",
"2025-01-01 09:01:00",
"2025-01-01 09:04:00",
"2025-01-01 09:00:00",
"2025-01-01 09:03:00",
],
"x": [10.0, 20.0, 30.0, 40.0, 50.0],
}
).with_columns(pl.col("ts").str.to_datetime())
q = lf.select(
pl.col("x").rolling_sum_by("ts", window_size="5m").over("g").alias("rs")
)
assert_gpu_result_equal(q, engine=engine)
```
Contributor guide
Research direction
Start with the example test_rolling_sum_by_over and inspect the existing cuDF-Polars implementations and tests for rolling_*_by expressions and over(...). Verify both in-memory and streaming execution for rolling_sum_by, rolling_mean_by, rolling_min_by, and rolling_max_by, using assert_gpu_result_equal as the completion check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100