mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 17:23:09 +00:00
feat: support multi table engines (#1277)
* feat: support multi table engines * refactor: adapt SqlHandler to support multiple table engines * refactor: refactor TableEngineManager * chore: apply review suggestions * chore: apply review suggestions * chore: apply review suggestions * chore: snafu context styling
This commit is contained in:
@@ -117,6 +117,7 @@ mod tests {
|
||||
use mito::config::EngineConfig as TableEngineConfig;
|
||||
use mito::table::test_util::new_test_object_store;
|
||||
use query::QueryEngineFactory;
|
||||
use table::engine::manager::MemoryTableEngineManager;
|
||||
|
||||
use super::*;
|
||||
type DefaultEngine = MitoEngine<EngineImpl<RaftEngineLogStore>>;
|
||||
@@ -153,9 +154,9 @@ mod tests {
|
||||
),
|
||||
object_store,
|
||||
));
|
||||
|
||||
let engine_manager = Arc::new(MemoryTableEngineManager::new(mock_engine.clone()));
|
||||
let catalog_manager = Arc::new(
|
||||
catalog::local::LocalCatalogManager::try_new(mock_engine.clone())
|
||||
catalog::local::LocalCatalogManager::try_new(engine_manager)
|
||||
.await
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
@@ -17,7 +17,9 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use catalog::{CatalogManagerRef, RegisterSystemTableRequest};
|
||||
use common_catalog::consts::{DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME, SCRIPTS_TABLE_ID};
|
||||
use common_catalog::consts::{
|
||||
DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME, MITO_ENGINE, SCRIPTS_TABLE_ID,
|
||||
};
|
||||
use common_catalog::format_full_table_name;
|
||||
use common_query::Output;
|
||||
use common_recordbatch::util as record_util;
|
||||
@@ -65,6 +67,7 @@ impl ScriptsTable {
|
||||
primary_key_indices: vec![0, 1],
|
||||
create_if_not_exists: true,
|
||||
table_options: TableOptions::default(),
|
||||
engine: MITO_ENGINE.to_string(),
|
||||
};
|
||||
|
||||
catalog_manager
|
||||
|
||||
Reference in New Issue
Block a user