mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-06-01 12:50:40 +00:00
feat: support to create external table (#1372)
* feat: support to create external table * chore: apply suggestions from CR * test: add create external table without ts type * chore: apply suggestions from CR * fix: fix import typo * refactor: move consts to table crate * chore: apply suggestions from CR * refactor: rename create_table_schema
This commit is contained in:
@@ -72,6 +72,18 @@ impl MemoryTableEngineManager {
|
||||
self.engine_procedures = RwLock::new(engine_procedures);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with(engines: Vec<TableEngineRef>) -> Self {
|
||||
let engines = engines
|
||||
.into_iter()
|
||||
.map(|engine| (engine.name().to_string(), engine))
|
||||
.collect::<HashMap<_, _>>();
|
||||
let engines = RwLock::new(engines);
|
||||
MemoryTableEngineManager {
|
||||
engines,
|
||||
engine_procedures: RwLock::new(HashMap::new()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
||||
@@ -29,6 +29,11 @@ use crate::error;
|
||||
use crate::error::ParseTableOptionSnafu;
|
||||
use crate::metadata::TableId;
|
||||
|
||||
pub const IMMUTABLE_TABLE_META_KEY: &str = "IMMUTABLE_TABLE_META";
|
||||
pub const IMMUTABLE_TABLE_LOCATION_KEY: &str = "LOCATION";
|
||||
pub const IMMUTABLE_TABLE_PATTERN_KEY: &str = "PATTERN";
|
||||
pub const IMMUTABLE_TABLE_FORMAT_KEY: &str = "FORMAT";
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CreateDatabaseRequest {
|
||||
pub db_name: String,
|
||||
|
||||
Reference in New Issue
Block a user