returns the default MemoryCatalogProvider
(
config: &SessionConfig,
table_factories: &HashMap<String, Arc<dyn TableProviderFactory>>,
runtime: &Arc<RuntimeEnv>,
)
| 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>> { |
nothing calls this directly
no test coverage detected