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

Method default_catalog

datafusion/core/src/execution/session_state_defaults.rs:66–83  ·  view source on GitHub ↗

returns the default MemoryCatalogProvider

(
        config: &SessionConfig,
        table_factories: &HashMap<String, Arc<dyn TableProviderFactory>>,
        runtime: &Arc<RuntimeEnv>,
    )

Source from the content-addressed store, hash-verified

64
65 /// returns the default MemoryCatalogProvider
66 pub fn default_catalog(
67 config: &SessionConfig,
68 table_factories: &HashMap<String, Arc<dyn TableProviderFactory>>,
69 runtime: &Arc<RuntimeEnv>,
70 ) -> MemoryCatalogProvider {
71 let default_catalog = MemoryCatalogProvider::new();
72
73 default_catalog
74 .register_schema(
75 &config.options().catalog.default_schema,
76 Arc::new(MemorySchemaProvider::new()),
77 )
78 .expect("memory catalog provider can register schema");
79
80 Self::register_default_schema(config, table_factories, runtime, &default_catalog);
81
82 default_catalog
83 }
84
85 /// returns the list of default [`ExprPlanner`]s
86 pub fn default_expr_planners() -> Vec<Arc<dyn ExprPlanner>> {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
register_schemaMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected