Retrieves a [`TableFunction`] reference by name. Returns an error if no table function has been registered with the provided name. [`register_udtf`]: SessionContext::register_udtf
(&self, name: &str)
| 1985 | /// |
| 1986 | /// [`register_udtf`]: SessionContext::register_udtf |
| 1987 | pub fn table_function(&self, name: &str) -> Result<Arc<TableFunction>> { |
| 1988 | self.state |
| 1989 | .read() |
| 1990 | .table_functions() |
| 1991 | .get(name) |
| 1992 | .cloned() |
| 1993 | .ok_or_else(|| plan_datafusion_err!("Table function '{name}' not found")) |
| 1994 | } |
| 1995 | |
| 1996 | /// Return a [`TableProvider`] for the specified table. |
| 1997 | pub async fn table_provider( |
nothing calls this directly
no test coverage detected