polars_arrow::compute::aggregate

Function sum_primitive

Source
pub fn sum_primitive<T>(array: &PrimitiveArray<T>) -> Option<T>
where T: NativeType + Simd + Add<Output = T> + Sum<T>, T::Simd: Add<Output = T::Simd> + Sum<T>,
Available 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.