You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a change in behaviour of how NULL values are handled in a sum over a partition after I upgraded from polars 0.18.4 to the latest version. The new behaviour is different from e.g. pyspark which has the same behaviour as we had in the old version. I was wondering if this was intentional or if this is a regression introduced in one of the later versions (after 0.18.4)?
Expected behavior
When running the snippet above, I was expecting to see the following result (note the difference in the last column of the first row in the result)
I think this is intended behavior. Regardless of what other systems do, sum() over a column of numbers returning null is nonsense. null indicates missing values, but a sum of a collection can never be 'missing', if the collection is empty or consists of only missing values, the sum is simply zero.
Thanks for the quick reply and confirming it is indeed intentional! Do you then perhaps have a suggestion on how to modify the snippet above so that I get the same result as with v0.18.4?
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
It is not really a bug, but more a change in behaviour when running the code below:
Issue description
I noticed a change in behaviour of how NULL values are handled in a sum over a partition after I upgraded from polars 0.18.4 to the latest version. The new behaviour is different from e.g. pyspark which has the same behaviour as we had in the old version. I was wondering if this was intentional or if this is a regression introduced in one of the later versions (after 0.18.4)?
Expected behavior
When running the snippet above, I was expecting to see the following result (note the difference in the last column of the first row in the result)
Installed versions
New version:
Old version:
The text was updated successfully, but these errors were encountered: