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

Function register_all

datafusion/functions-nested/src/lib.rs:213–236  ·  view source on GitHub ↗

Registers all enabled packages with a [`FunctionRegistry`]

(registry: &mut dyn FunctionRegistry)

Source from the content-addressed store, hash-verified

211
212/// Registers all enabled packages with a [`FunctionRegistry`]
213pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> {
214 let functions: Vec<Arc<ScalarUDF>> = all_default_nested_functions();
215 functions.into_iter().try_for_each(|udf| {
216 let existing_udf = registry.register_udf(udf)?;
217 if let Some(existing_udf) = existing_udf {
218 debug!("Overwrite existing UDF: {}", existing_udf.name());
219 }
220 Ok(()) as Result<()>
221 })?;
222
223 let functions: Vec<Arc<HigherOrderUDF>> = all_default_higher_order_functions();
224 functions.into_iter().try_for_each(|function| {
225 let existing_function = registry.register_higher_order_function(function)?;
226 if let Some(existing_function) = existing_function {
227 debug!(
228 "Overwrite existing higher-order function: {}",
229 existing_function.name()
230 );
231 }
232 Ok(()) as Result<()>
233 })?;
234
235 Ok(())
236}
237
238#[cfg(test)]
239mod tests {

Callers

nothing calls this directly

Calls 5

into_iterMethod · 0.45
register_udfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…