Confusing error message in when
when using, for example, min
instead of min_horizontal
#11139
Closed
2 tasks done
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
On 0.19.2:
Log output
Issue description
On 0.18.15 this problem did not arise, because
min
supported horizontal operation, but it can also arise out of other types of user error.Expected behavior
The ideal error message would let me know that the number of columns in one of the branches of the conditional is 2 and should be 1. Unless that is actually somehow allowed, and then it should say the number of columns is inconsistent across branches.
The fact that downstream, that seems to cause there to be 2 "C" columns is an implementation detail, and didn't help me understand my (now) misuse of
min
.Installed versions
The text was updated successfully, but these errors were encountered: