js8544 commented on issue #37090:
URL: https://github.com/apache/arrow/issues/37090#issuecomment-1671344168

   @felipecrv @pitrou I noticed that `mean` reuses the `sum` kernels and also 
suffer from overflow. It first `sum`s all inputs (where overflow can happen) 
and then divide by count. However, since the result of `mean` is double, it 
should add the values as doubles, instead of reusing the `sum` kernels. Do we 
want:
   
   1. Refactor the `mean` kernel to add the values as doubles.
   2. Also add a `mean_checked` function.
   
   I'm leaning towards option 1.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to