-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc]Refresh table statement document modification #1843
Open
qsy840035156
wants to merge
11
commits into
apache:master
Choose a base branch
from
qsy840035156:DORIS-18235
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
71d5339
DESC TABLE语句
qsy840035156 f1236ce
CANCEL ALTER TABLE语句文档修改
qsy840035156 9d68b93
CANCEL ALTER TABLE语句文档修改
qsy840035156 f329ef9
TRUNCATE TABLE语句文档修改
qsy840035156 68da147
Drop TABLE语句文档修改
qsy840035156 1511478
SHOW CREATE TABLE语句文档修改
qsy840035156 924dc93
DESC TABLE语句文档修改
qsy840035156 969155e
CANCEL ALTER TABLE 语句文档修改
qsy840035156 f7e83d0
TRUNCATE TABLE 语句文档修改
qsy840035156 9e837c5
CANCEL ALTER TABLE语句文档修改
qsy840035156 d6c35ae
CANCEL ALTER TABLE语句文档修改
qsy840035156 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -24,87 +24,91 @@ specific language governing permissions and limitations | |||||
under the License. | ||||||
--> | ||||||
|
||||||
## CANCEL-ALTER-TABLE | ||||||
## Description | ||||||
|
||||||
### Name | ||||||
This statement is used to cancel (revoke) an ongoing ALTER TABLE operation. You can use this command to terminate an ALTER TABLE operation while it is being executed. | ||||||
|
||||||
CANCEL ALTER TABLE | ||||||
|
||||||
### Description | ||||||
|
||||||
This statement is used to undo an ALTER operation. | ||||||
|
||||||
1. Undo the ALTER TABLE COLUMN operation | ||||||
|
||||||
grammar: | ||||||
## Syntax | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE COLUMN | ||||||
FROM db_name.table_name | ||||||
CANCEL ALTER TABLE COLUMN|ROLLUP FROM <db_name>.<table_name> [ <job_id1> [ , <job_id2> ... ]] | ||||||
``` | ||||||
|
||||||
2. Undo the ALTER TABLE ROLLUP operation | ||||||
## Required Parameters | ||||||
**1. `COLUMN|ROLLUP`** | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
>Specify the type of modification to cancel, must choose one of: | ||||||
>- COLUMN: Cancel table column modification operations | ||||||
>- ROLLUP: Cancel materialized view modification operations | ||||||
|
||||||
grammar: | ||||||
**2.`<db_name>`** | ||||||
> Specifies the identifier (that is, the name) of the database. | ||||||
> | ||||||
> Identifier must begin with an alphabet character (if Unicode name support is enabled, any language character is allowed), and must not contain spaces or special characters, except for the entire identifier string enclosed in quotes (e.g., `My Database`). | ||||||
> | ||||||
> Identifier cannot use reserved keywords. | ||||||
> | ||||||
> For more information, see Identifier Requirements and Reserved Keywords. | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE ROLLUP | ||||||
FROM db_name.table_name | ||||||
``` | ||||||
**3.`<table_name>`** | ||||||
> Specifies the identifier (that is, the name) of the table, within its database (Database). | ||||||
> | ||||||
> Identifier must begin with an alphabet character (if Unicode name support is enabled, any language character is allowed), and must not contain spaces or special characters, except for the entire identifier string enclosed in quotes (e.g., `My Object`). | ||||||
> | ||||||
> Identifier cannot use reserved keywords. | ||||||
> | ||||||
> For more information, see Identifier Requirements and Reserved Keywords. | ||||||
|
||||||
3. Batch cancel rollup operations based on job id | ||||||
|
||||||
grammar: | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE ROLLUP | ||||||
FROM db_name.table_name (jobid,...) | ||||||
``` | ||||||
## Optional Parameters | ||||||
**1. `<job_id>`** | ||||||
> The specific job ID to cancel. | ||||||
> | ||||||
> If a job ID is specified, only the specified job is canceled; if not specified, all ongoing modifications of the specified type (COLUMN or ROLLUP) on the table are canceled. | ||||||
> | ||||||
> You can specify multiple job IDs, separated by commas. | ||||||
> | ||||||
> You can obtain job IDs by using the `SHOW ALTER TABLE COLUMN` or `SHOW ALTER TABLE ROLLUP` command. | ||||||
|
||||||
Notice: | ||||||
|
||||||
- This command is an asynchronous operation. You need to use `show alter table rollup` to check the task status to confirm whether the execution is successful or not. | ||||||
## Permission Control | ||||||
Users who execute this SQL command must have at least the following permissions: | ||||||
|
||||||
4. Undo the ALTER CLUSTER operation | ||||||
|
||||||
grammar: | ||||||
| Privilege | Object | Notes | | ||||||
| :---------------- | :------------- | :---------------------------- | | ||||||
| ALTER_PRIV | Table | CANCEL ALTER TABLE belongs to table ALTER operation | | ||||||
|
||||||
``` | ||||||
(To be implemented...) | ||||||
``` | ||||||
|
||||||
### Example | ||||||
## Notes | ||||||
- This command is an asynchronous operation, and the actual execution result needs to be confirmed by using `SHOW ALTER TABLE COLUMN` or `SHOW ALTER TABLE ROLLUP` to check the status of the task. | ||||||
|
||||||
1. Undo the ALTER COLUMN operation on my_table. | ||||||
## Example | ||||||
|
||||||
[CANCEL ALTER TABLE COLUMN] | ||||||
1. Cancel ALTER TABLE COLUMN operation | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE COLUMN | ||||||
FROM example_db.my_table; | ||||||
FROM db_name.table_name | ||||||
``` | ||||||
|
||||||
1. Undo the ADD ROLLUP operation under my_table. | ||||||
2. Cancel ALTER TABLE ROLLUP operation | ||||||
|
||||||
[CANCEL ALTER TABLE ROLLUP] | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE ROLLUP | ||||||
FROM example_db.my_table; | ||||||
FROM db_name.table_name | ||||||
``` | ||||||
|
||||||
1. Undo the ADD ROLLUP operation under my_table according to the job id. | ||||||
3. Cancel ALTER TABLE ROLLUP operation in batches based on job ID | ||||||
|
||||||
[CANCEL ALTER TABLE ROLLUP] | ||||||
|
||||||
```sql | ||||||
CANCEL ALTER TABLE ROLLUP | ||||||
FROM example_db.my_table(12801,12802); | ||||||
FROM db_name.table_name (jobid,...) | ||||||
``` | ||||||
|
||||||
### Keywords | ||||||
|
||||||
CANCEL, ALTER, TABLE, CANCEL ALTER | ||||||
|
||||||
### Best Practice | ||||||
4. Cancel ALTER CLUSTER operation | ||||||
|
||||||
```sql | ||||||
(To be implemented...) | ||||||
``` | ||||||
Comment on lines
+113
to
+115
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这是个未完成的TODO? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 原始的官网是这样写的 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.