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

Function invoke_replace_with_args

datafusion/functions/benches/replace.rs:93–111  ·  view source on GitHub ↗
(
    args: Vec<ColumnarValue>,
    number_rows: usize,
)

Source from the content-addressed store, hash-verified

91}
92
93fn invoke_replace_with_args(
94 args: Vec<ColumnarValue>,
95 number_rows: usize,
96) -> Result<ColumnarValue, DataFusionError> {
97 let arg_fields = args
98 .iter()
99 .enumerate()
100 .map(|(idx, arg)| Field::new(format!("arg_{idx}"), arg.data_type(), true).into())
101 .collect::<Vec<_>>();
102 let config_options = Arc::new(ConfigOptions::default());
103
104 string::replace().invoke_with_args(ScalarFunctionArgs {
105 args,
106 arg_fields,
107 number_rows,
108 return_field: Field::new("f", DataType::Utf8, true).into(),
109 config_options: Arc::clone(&config_options),
110 })
111}
112
113fn criterion_benchmark(c: &mut Criterion) {
114 for size in [1024, 4096] {

Callers 1

criterion_benchmarkFunction · 0.85

Calls 7

newFunction · 0.85
replaceFunction · 0.85
mapMethod · 0.45
iterMethod · 0.45
intoMethod · 0.45
data_typeMethod · 0.45
invoke_with_argsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…