Describe the bug, including details regarding any error messages, version, and platform.
>>> arr = pa.array([-1303487490025821099, -8371390547526583103, -2572374159461887095], type=pa.int64())
>>> pa.compute.mean(arr)
<pyarrow.DoubleScalar: 2.0664972922317535e+18>
>>>
When using numpy:
>>> arr.to_numpy().mean()
-4.0824173990047636e+18
>>>
Seems like overflow case is not handled correctly when using arrow array.
Component(s)
Python