Skip to main content

max

Function max 

pub fn max<T>(
    array: &PrimitiveArray<T>,
) -> Option<<T as ArrowPrimitiveType>::Native>
Expand description

Returns the maximum value in the array, according to the natural order.

Floating point values are compared using IEEE 754 totalOrder (see f64::total_cmp): a positive NaN is greater than every non-NaN value, including positive infinity, and a negative NaN is less than every non-NaN value, including negative infinity.

ยงExample

let array = Int32Array::from(vec![4, 8, 2]);
let result = max(&array);
assert_eq!(result, Some(8));