Registers all enabled packages with a [`FunctionRegistry`]
(registry: &mut dyn FunctionRegistry)
| 211 | |
| 212 | /// Registers all enabled packages with a [`FunctionRegistry`] |
| 213 | pub 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)] |
| 239 | mod tests { |
nothing calls this directly
no test coverage detected
searching dependent graphs…