polars
polars copied to clipboard
`pl.element` inside `list.eval` causes ColumnNotFoundError
Checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
import polars as pl
s = pl.Series([[1, 2]])
s.list.eval(pl.when(False).then(1).otherwise(pl.element().hash()))
# ColumnNotFoundError:
Log output
No response
Issue description
On main it produces a ColumnNotFoundError
, it runs on 1.9.0.
From what I can gather, it is a side effect of: https://github.com/pola-rs/polars/pull/19195
The underlying problem is likely relevant to:
https://github.com/pola-rs/polars/pull/18993#discussion_r1780705514
we really need to replace that
element => col("")
hack with a properExpr::Element
type and something that can run it.
Expected behavior
No error.
Installed versions
main