[BUG] cudf-polars returns list[i32] instead of list[list[i32]] when aggregating with a list literal
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
See the repro
**Steps/Code to reproduce bug**
```python
import polars as pl
q = (
pl.LazyFrame({"a": [1, 1, 2]})
.group_by("a")
.agg(pl.Series("value", [[4, 5, 6]], dtype=pl.List(pl.Int32)))
)
print("CPU\n", q.collect())
print("GPU\n", q.collect(engine="gpu"))
```
```
CPU
shape: (2, 2)
┌─────┬─────────────────┐
│ a ┆ value │
│ --- ┆ --- │
│ i64 ┆ list[list[i32]] │
╞═════╪═════════════════╡
│ 1 ┆ [[4, 5, 6]] │
│ 2 ┆ [[4, 5, 6]] │
└─────┴─────────────────┘
GPU
shape: (2, 2)
┌─────┬───────────┐
│ a ┆ value │
│ --- ┆ --- │
│ i64 ┆ list[i32] │
╞═════╪═══════════╡
│ 2 ┆ [4, 5, 6] │
│ 1 ┆ [4, 5, 6] │
└─────┴───────────┘
```
**Expected behavior**
Match polars, the aggregation should match the literal shape
Contributor guide
Assessment
This issue has not been assessed yet.