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

Function create_args

datafusion/functions-nested/benches/array_replace.rs:423–447  ·  view source on GitHub ↗
(
    haystack: ArrayRef,
    from: ScalarValue,
    to: ScalarValue,
)

Source from the content-addressed store, hash-verified

421
422#[inline]
423fn create_args(
424 haystack: ArrayRef,
425 from: ScalarValue,
426 to: ScalarValue,
427) -> ScalarFunctionArgs {
428 let number_rows = haystack.len();
429 let haystack_type = haystack.data_type().clone();
430 let from_type = from.data_type().clone();
431 let to_type = to.data_type().clone();
432 ScalarFunctionArgs {
433 args: vec![
434 ColumnarValue::Array(haystack),
435 ColumnarValue::Scalar(from),
436 ColumnarValue::Scalar(to),
437 ],
438 arg_fields: vec![
439 Field::new("haystack", haystack_type.clone(), true).into(),
440 Field::new("from", from_type, true).into(),
441 Field::new("to", to_type, true).into(),
442 ],
443 number_rows,
444 return_field: Field::new("result", haystack_type, true).into(),
445 config_options: Arc::new(ConfigOptions::default()),
446 }
447}
448
449#[inline]
450fn create_args_n(

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…