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

Function array_repeat_inner

datafusion/functions-nested/src/repeat.rs:145–160  ·  view source on GitHub ↗
(args: &[ArrayRef])

Source from the content-addressed store, hash-verified

143}
144
145fn array_repeat_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
146 let element = &args[0];
147 let count_array = as_int64_array(&args[1])?;
148
149 match element.data_type() {
150 List(_) => {
151 let list_array = as_list_array(element)?;
152 general_list_repeat::<i32>(list_array, count_array)
153 }
154 LargeList(_) => {
155 let list_array = as_large_list_array(element)?;
156 general_list_repeat::<i64>(list_array, count_array)
157 }
158 _ => general_repeat::<i32>(element, count_array),
159 }
160}
161
162/// For each element of `array[i]` repeat `count_array[i]` times.
163///

Callers

nothing calls this directly

Calls 4

as_int64_arrayFunction · 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…