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

Method table_function

datafusion/core/src/execution/context/mod.rs:1987–1994  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 4

table_functionsMethod · 0.80
readMethod · 0.80
clonedMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected