feat: define CommentOn task (#295)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ning Sun
2025-12-18 12:41:40 +08:00
committed by GitHub
parent 5b7d43d7bf
commit 173efe5ec6
10 changed files with 6027 additions and 1309 deletions
+20
View File
@@ -39,6 +39,7 @@ message DdlRequest {
CreateViewExpr create_view = 10;
DropViewExpr drop_view = 11;
AlterDatabaseExpr alter_database = 12;
CommentOnExpr comment_on = 13;
}
}
@@ -387,3 +388,22 @@ message DropTriggerExpr {
string trigger_name = 2;
bool drop_if_exists = 3;
}
// The type of object to comment on
enum CommentObjectType {
TABLE = 0;
COLUMN = 1;
FLOW = 2;
}
// Comment on a table, column, or flow
message CommentOnExpr {
string catalog_name = 1;
string schema_name = 2;
CommentObjectType object_type = 3;
string object_name = 4;
// Column name (only for Column comments)
string column_name = 5;
// The comment text (null to remove comment)
string comment = 6;
}
+5
View File
@@ -98,6 +98,10 @@ message DropTriggerTask {
DropTriggerExpr drop_trigger = 1;
}
message CommentOnTask {
CommentOnExpr comment_on = 1;
}
message DdlTaskRequest {
RequestHeader header = 1;
QueryContext query_context = 64;
@@ -119,6 +123,7 @@ message DdlTaskRequest {
AlterDatabaseTask alter_database_task = 15;
CreateTriggerTask create_trigger_task = 16;
DropTriggerTask drop_trigger_task = 17;
CommentOnTask comment_on_task = 18;
}
}