feat: adds view expressions (#165)
* feat: adds view expressions * feat: adds meta tasks for view * feat: adds view_info to CreateViewTask * chore: rename create_or_replace to or_replace
This commit is contained in:
@@ -35,6 +35,8 @@ message DdlRequest {
|
||||
TruncateTableExpr truncate_table = 7;
|
||||
CreateFlowExpr create_flow = 8;
|
||||
DropFlowExpr drop_flow = 9;
|
||||
CreateViewExpr create_view = 10;
|
||||
DropViewExpr drop_view = 11;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +62,25 @@ message DropFlowExpr {
|
||||
bool drop_if_exists = 5;
|
||||
}
|
||||
|
||||
// Create a view
|
||||
message CreateViewExpr {
|
||||
string catalog_name = 1;
|
||||
string schema_name = 2;
|
||||
string view_name = 3;
|
||||
bytes logical_plan = 4;
|
||||
bool create_if_not_exists = 5;
|
||||
bool or_replace = 6;
|
||||
}
|
||||
|
||||
// Drop a view
|
||||
message DropViewExpr {
|
||||
string catalog_name = 1;
|
||||
string schema_name = 2;
|
||||
string view_name = 3;
|
||||
TableId view_id = 4;
|
||||
bool drop_if_exists = 5;
|
||||
}
|
||||
|
||||
message CreateTableExpr {
|
||||
string catalog_name = 1;
|
||||
string schema_name = 2;
|
||||
|
||||
@@ -68,6 +68,17 @@ message DropFlowTask {
|
||||
DropFlowExpr drop_flow = 1;
|
||||
}
|
||||
|
||||
// Create a view task
|
||||
message CreateViewTask {
|
||||
CreateViewExpr create_view = 1;
|
||||
bytes view_info = 2;
|
||||
}
|
||||
|
||||
// Drop a view task
|
||||
message DropViewTask {
|
||||
DropViewExpr drop_view = 1;
|
||||
}
|
||||
|
||||
message DdlTaskRequest {
|
||||
RequestHeader header = 1;
|
||||
QueryContext query_context = 64;
|
||||
@@ -84,6 +95,8 @@ message DdlTaskRequest {
|
||||
CreateDatabaseTask create_database_task = 10;
|
||||
CreateFlowTask create_flow_task = 11;
|
||||
DropFlowTask drop_flow_task = 12;
|
||||
CreateViewTask create_view_task = 13;
|
||||
DropViewTask drop_view_task = 14;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user