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

Method create_custom_table

datafusion/core/src/execution/context/mod.rs:1413–1428  ·  view source on GitHub ↗
(
        &self,
        cmd: &CreateExternalTable,
    )

Source from the content-addressed store, hash-verified

1411 }
1412
1413 async fn create_custom_table(
1414 &self,
1415 cmd: &CreateExternalTable,
1416 ) -> Result<Arc<dyn TableProvider>> {
1417 let state = self.state.read().clone();
1418 let file_type = cmd.file_type.to_uppercase();
1419 let factory =
1420 state
1421 .table_factories()
1422 .get(file_type.as_str())
1423 .ok_or_else(|| {
1424 exec_datafusion_err!("Unable to find factory for {}", cmd.file_type)
1425 })?;
1426 let table = (*factory).create(&state, cmd).await?;
1427 Ok(table)
1428 }
1429
1430 async fn find_and_deregister(
1431 &self,

Callers 1

create_external_tableMethod · 0.80

Calls 6

readMethod · 0.80
table_factoriesMethod · 0.80
cloneMethod · 0.45
getMethod · 0.45
as_strMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected