feat: add SQL syntax support for alter, execute, describe, show, drop task #13344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… task
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Support Alter Task Semantics
Support Drop Task Semantics
Support Execute Task Semantics
Support Describe Task Semantics
Support Show Task Semantics
Add Unit Tests
Description
Alter Task Semantics
<name>
RESUME
|SUSPEND
MODIFY AS <sql>
SET
WAREHOUSE = <string>
SCHEDULE = '{ <number> MINUTE | USING CRON <expr> <time_zone> }'
SUSPEND_TASK_AFTER_NUM_FAILURES = <num>
COMMENT = <string>
UNSET
[ WAREHOUSE ]
Examples
Certainly! Below are descriptions for the provided SQL commands in the expected format:
The following example resumes the task named
MyTask1
.The following example suspends the task named
MyTask1
.The following example modifies the settings of the task named
MyTask1
, setting a specific warehouse, a cron schedule, and a comment.The following example modifies the settings of the task named
MyTask1
, setting a specific warehouse, an interval schedule, the number of failures after which to suspend the task, and a comment.The following example modifies the SQL statement of the task named
MyTask2
to a new SQL statement.Drop Task Semantics
[ IF EXISTS ]
<name>
Examples
The following example drops the task named
MyTask1
if it exists.Show Tasks Semantics
[ LIKE '<pattern>' ]
Examples
The following example shows all tasks with names that start with
My
.Describe Task Semantics
<name>
Examples
The following example describes the task named
MyTask1
.DESC TASK MyTask1
Execute Task Semantics
<name>
Examples
The following example executes the task named
MyTask1
.This change is