concat_list raises an error or returns an empty list if one of the filtered cols inside is empty #15208
Open
2 tasks done
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
works as expected:
shape: (1, 2)
┌─────┬─────────────┐
│ c ┆ a │
│ --- ┆ --- │
│ i64 ┆ list[i64] │
╞═════╪═════════════╡
│ 0 ┆ [1, 3, … 4] │
└─────┴─────────────┘
However, if either the first filter or the second filter evaluates to nothing, the behavior is unexpected:
raises polars.exceptions.ShapeError: series length 2 does not match expected length of 0
and if you add an extra first() operation, no error is thrown and it silently returns a wrong empty list
shape: (1, 2)
┌─────┬───────────┐
│ c ┆ a │
│ --- ┆ --- │
│ i64 ┆ list[i64] │
╞═════╪═══════════╡
│ 0 ┆ [] │
└─────┴───────────┘
Log output
No response
Issue description
...
Expected behavior
...
Installed versions
The text was updated successfully, but these errors were encountered: