Skip to content

[BUG] Polars GPU engine returns incorrect nesting for deeply nested list #18630

Open
@Matt711

Description

@Matt711

Describe the bug
When constructing a nested list column using the GPU engine (via pl.GPUEngine), the result has one less level of nesting compared to the CPU engine. The GPU output is missing a layer of list nesting.

Steps/Code to reproduce bug

import polars as pl

print(
    pl.LazyFrame().select(a=[[[1]]])
    .collect(engine=pl.GPUEngine(raise_on_fail=True))
    .to_dict(as_series=False)
)

print(
    pl.LazyFrame().select(a=[[[1]]])
    .collect()
    .to_dict(as_series=False)
)
CPU
{'a': [[[[1]]]]}

GPU
{'a': [[[1]]]}

Expected behavior
Match polars

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions