pub fn sum_primitive<T>(array: &PrimitiveArray<T>) -> Option<T> where
T: NativeType + Simd + Add<T, Output = T> + Sum<T>,
<T as Simd>::Simd: Add<<T as Simd>::Simd>,
<T as Simd>::Simd: Sum<T>,
<<T as Simd>::Simd as Add<<T as Simd>::Simd>>::Output == <T as Simd>::Simd,
This is supported on crate feature
compute_aggregate
only.Expand description
Returns the sum of values in the array.
Returns None
if the array is empty or only contains null values.