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

Method register_catalog

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

Registers a named catalog using a custom `CatalogProvider` so that it can be referenced from SQL statements executed against this context. Returns the [`CatalogProvider`] previously registered for this name, if any

(
        &self,
        name: impl Into<String>,
        catalog: Arc<dyn CatalogProvider>,
    )

Source from the content-addressed store, hash-verified

1887 /// Returns the [`CatalogProvider`] previously registered for this
1888 /// name, if any
1889 pub fn register_catalog(
1890 &self,
1891 name: impl Into<String>,
1892 catalog: Arc<dyn CatalogProvider>,
1893 ) -> Option<Arc<dyn CatalogProvider>> {
1894 let name = name.into();
1895 self.state
1896 .read()
1897 .catalog_list()
1898 .register_catalog(name, catalog)
1899 }
1900
1901 /// Retrieves the list of available catalog names.
1902 pub fn catalog_names(&self) -> Vec<String> {

Callers 7

buildMethod · 0.45
create_catalogMethod · 0.45
catalog_and_schema_testFunction · 0.45
cross_catalog_accessFunction · 0.45
catalogs_not_leakedFunction · 0.45

Calls 3

catalog_listMethod · 0.80
readMethod · 0.80
intoMethod · 0.45

Tested by 2