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

Function create_args_n

datafusion/functions-nested/benches/array_remove.rs:427–451  ·  view source on GitHub ↗
(
    haystack: ArrayRef,
    needle: ScalarValue,
    n: ScalarValue,
)

Source from the content-addressed store, hash-verified

425
426#[inline]
427fn create_args_n(
428 haystack: ArrayRef,
429 needle: ScalarValue,
430 n: ScalarValue,
431) -> ScalarFunctionArgs {
432 let number_rows = haystack.len();
433 let haystack_type = haystack.data_type().clone();
434 let needle_type = needle.data_type().clone();
435 let n_type = n.data_type().clone();
436 ScalarFunctionArgs {
437 args: vec![
438 ColumnarValue::Array(haystack),
439 ColumnarValue::Scalar(needle),
440 ColumnarValue::Scalar(n),
441 ],
442 arg_fields: vec![
443 Field::new("haystack", haystack_type.clone(), true).into(),
444 Field::new("needle", needle_type, true).into(),
445 Field::new("n", n_type, true).into(),
446 ],
447 number_rows,
448 return_field: Field::new("result", haystack_type, true).into(),
449 config_options: Arc::new(ConfigOptions::default()),
450 }
451}
452
453fn create_list_array<Builder, Item>(
454 num_rows: usize,

Callers 2

Calls 5

newFunction · 0.85
lenMethod · 0.45
cloneMethod · 0.45
data_typeMethod · 0.45
intoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…