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

Function array_positions_inner

datafusion/functions-nested/src/position.rs:476–484  ·  view source on GitHub ↗
(args: &[ArrayRef])

Source from the content-addressed store, hash-verified

474}
475
476fn array_positions_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
477 let [haystack, needle] = take_function_args("array_positions", args)?;
478
479 match &haystack.data_type() {
480 List(_) => general_positions::<i32>(as_list_array(&haystack)?, needle),
481 LargeList(_) => general_positions::<i64>(as_large_list_array(&haystack)?, needle),
482 dt => exec_err!("array_positions does not support type '{dt}'"),
483 }
484}
485
486fn general_positions<O: OffsetSizeTrait>(
487 haystack: &GenericListArray<O>,

Callers

nothing calls this directly

Calls 4

take_function_argsFunction · 0.85
as_list_arrayFunction · 0.85
as_large_list_arrayFunction · 0.85
data_typeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…