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:
LFC
2022-09-06 12:51:07 +08:00
committed by GitHub
parent 3f9144a2e3
commit 119ff2fc2e
26 changed files with 605 additions and 77 deletions

View File

@@ -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;

View File

@@ -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