mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-20 15:00:40 +00:00
feat: create table through GRPC interface (#224)
* feat: create table through GRPC interface * move `CreateExpr` `oneof` expr of `AdminExpr` in `admin.proto`, and implement the admin GRPC interface * add `table_options` and `partition_options` to `CreateExpr` * resolve code review comments Co-authored-by: luofucong <luofucong@greptime.com>
This commit is contained in:
@@ -525,6 +525,7 @@ mod tests {
|
||||
create_if_not_exists: true,
|
||||
desc: None,
|
||||
primary_key_indices: Vec::default(),
|
||||
table_options: HashMap::new(),
|
||||
};
|
||||
|
||||
let created_table = table_engine.create_table(&ctx, request).await.unwrap();
|
||||
@@ -547,6 +548,7 @@ mod tests {
|
||||
create_if_not_exists: false,
|
||||
desc: None,
|
||||
primary_key_indices: Vec::default(),
|
||||
table_options: HashMap::new(),
|
||||
};
|
||||
|
||||
let result = table_engine.create_table(&ctx, request).await;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
mod mock_engine;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use datatypes::prelude::ConcreteDataType;
|
||||
@@ -95,6 +96,7 @@ pub async fn setup_test_engine_and_table() -> (
|
||||
schema: schema.clone(),
|
||||
create_if_not_exists: true,
|
||||
primary_key_indices: Vec::default(),
|
||||
table_options: HashMap::new(),
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -126,6 +128,7 @@ pub async fn setup_mock_engine_and_table(
|
||||
schema: schema.clone(),
|
||||
create_if_not_exists: true,
|
||||
primary_key_indices: Vec::default(),
|
||||
table_options: HashMap::new(),
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user