Open CyborgSquirrel opened 7 months ago
The same bug seems to be triggered, when performing group-by agg on empty data frames with pl.Array()
columns.
Example:
# works
(
pl.DataFrame({
"id": pl.Series([], dtype=pl.Utf8()),
"val": pl.Series([], dtype=pl.List(pl.Float32)),
})
.group_by(pl.col("id"))
.first()
)
# fails
(
pl.DataFrame({
"id": pl.Series([], dtype=pl.Utf8()),
"val": pl.Series([], dtype=pl.Array(pl.Float32, 20),
)})
.group_by(pl.col("id"))
.first()
)
# exception: `PanicException: called `Result::unwrap()` on an `Err` value: InvalidOperation(ErrString("concat requires input of at least one array"))`.
Checks
Reproducible example
Log output
Issue description
Tested on Ubuntu 22.04.4 LTS.
Same error happens if I swap
a
andb
in the join.If I use a list instead of an array, it works as expected.
If the result of joining
a
andb
is not empty, then it also works as expected.Expected behavior
The join should output an empty
DataFrame
. For the provided example, the output should look something like this:Installed versions