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

Method invoke_with_args

datafusion/functions/src/unicode/strpos.rs:108–118  ·  view source on GitHub ↗
(&self, args: ScalarFunctionArgs)

Source from the content-addressed store, hash-verified

106 }
107
108 fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> {
109 // Fast path for array haystack and scalar needle
110 if let (
111 ColumnarValue::Array(haystack_array),
112 ColumnarValue::Scalar(needle_scalar),
113 ) = (&args.args[0], &args.args[1])
114 {
115 return strpos_scalar_needle(haystack_array, needle_scalar);
116 }
117 make_scalar_function(strpos, vec![])(&args.args)
118 }
119
120 fn aliases(&self) -> &[String] {
121 &self.aliases

Callers

nothing calls this directly

Calls 2

strpos_scalar_needleFunction · 0.85
make_scalar_functionFunction · 0.50

Tested by

no test coverage detected