MCPcopy Create free account
hub / github.com/apache/datafusion / try_primitive_array_min_max

Function try_primitive_array_min_max

datafusion/functions-nested/src/min_max.rs:223–237  ·  view source on GitHub ↗

Dispatches to a typed primitive min/max implementation, or returns `None` if the element type is not a primitive.

(
    list_array: &GenericListArray<O>,
    is_min: bool,
)

Source from the content-addressed store, hash-verified

221/// Dispatches to a typed primitive min/max implementation, or returns `None` if
222/// the element type is not a primitive.
223fn try_primitive_array_min_max<O: OffsetSizeTrait>(
224 list_array: &GenericListArray<O>,
225 is_min: bool,
226) -> Option<Result<ArrayRef>> {
227 macro_rules! helper {
228 ($t:ty) => {
229 return Some(primitive_array_min_max::<O, $t>(list_array, is_min))
230 };
231 }
232 downcast_primitive! {
233 list_array.value_type() => (helper),
234 _ => {}
235 }
236 None
237}
238
239/// Threshold to switch from direct iteration to using `min` / `max` kernel from
240/// `arrow::compute`. The latter has enough per-invocation overhead that direct

Callers 1

array_min_max_helperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…