[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
pl.select(pl.lit('a.b.c').str.split('.').list.to_struct().struct.field('*'))
Log output
thread '<unnamed>' panicked at crates/polars-plan/src/logical_plan/conversion/expr_expansion.rs:362:22:
index out of bounds: the len is 0 but the index is 0
Issue description
I'm not sure if this can actually work in a single context due to .list.to_struct() having an "unknown schema".
Checks
Reproducible example
Log output
Issue description
I'm not sure if this can actually work in a single context due to
.list.to_struct()
having an "unknown schema".But the PanicException can be fixed.
Using a separate context works as expected.
Expected behavior
No panic exception.
Installed versions