Open moritzwilksch opened 6 days ago
I have done some digging and the issue is that fill_null
does not grab the supertype of both inputs. I could theoretically solve this in the type coercion, but we have decided that we would like to instead move to dyn list
, dyn struct
, dyn enum
and dyn categorical
. This is a refactor that would solve this issue in a wider context.
Checks
Reproducible example
Log output
Issue description
When using
.fill_null(pl.lit([]))
on a dataframe with enforced schema that has been created by exploding and unnesting structs, the result will look fine but callingto_arrow()
on it will panic. Note this issue does not occur if.fill_null(pl.lit([]))
Sorry for the big repro, haven't been able to distill it down any further until now. This also affects dataframe comparisons and
assert_frame_equal
, they error with the same panic.Panic looks similar to #17479, although no enums are involved here.
Expected behavior
No panic on the
to_arrow()
call. The result looks fine (i.e. noList[Null] or similar
) so I'd expect it to be fine internally as wellInstalled versions