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

Function array_remove_internal

datafusion/functions-nested/src/remove.rs:340–358  ·  view source on GitHub ↗
(
    array: &ArrayRef,
    element_array: &ArrayRef,
    arr_n: &[i64],
)

Source from the content-addressed store, hash-verified

338}
339
340fn array_remove_internal(
341 array: &ArrayRef,
342 element_array: &ArrayRef,
343 arr_n: &[i64],
344) -> Result<ArrayRef> {
345 match array.data_type() {
346 DataType::List(_) => {
347 let list_array = array.as_list::<i32>();
348 general_remove::<i32>(list_array, element_array, arr_n)
349 }
350 DataType::LargeList(_) => {
351 let list_array = array.as_list::<i64>();
352 general_remove::<i64>(list_array, element_array, arr_n)
353 }
354 array_type => {
355 exec_err!("array_remove_all does not support type '{array_type}'.")
356 }
357 }
358}
359
360/// For each element of `list_array[i]`, removed up to `arr_n[i]` occurrences
361/// of `element_array[i]`.

Callers 3

array_remove_innerFunction · 0.85
array_remove_n_innerFunction · 0.85
array_remove_all_innerFunction · 0.85

Calls 1

data_typeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…