Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Selfeer committed Sep 25, 2023
1 parent 8018e31 commit b8054fb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
3 changes: 1 addition & 2 deletions alter/table/requirements/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ This software requirements specification covers requirements for `ALTER TABLE` s
The documentation used:

- https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#replace-partition

GNU nano 6.2 asd *

## User Actions


Expand Down
37 changes: 18 additions & 19 deletions alter/table/requirements/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,28 +399,27 @@
The documentation used:
- https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#replace-partition
GNU nano 6.2 asd *
## User Actions
| **Action** | **Description** |
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------|
| `DETACH PARTITION/PART` | `ALTER TABLE table_name [ON CLUSTER cluster] DETACH PARTITION/PART partition_expr` |
| `DROP PARTITION/PART` | `ALTER TABLE table_name [ON CLUSTER cluster] DROP PARTITION/PART partition_expr` | >
| `DROP DETACHED PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] DROP DETACHED PARTITION/PART partition_expr` |
| `ATTACH PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] ATTACH PARTITION/PART partition_expr` |
| `ATTACH PARTITION FROM` | `ALTER TABLE table2 [ON CLUSTER cluster] ATTACH PARTITION partition_expr FROM table1` |
| `REPLACE PARTITION` | `ALTER TABLE table2 [ON CLUSTER cluster] REPLACE PARTITION partition_expr FROM table1` |
| `MOVE PARTITION TO TABLE` | `ALTER TABLE table_source [ON CLUSTER cluster] MOVE PARTITION partition_expr TO TABLE table_dest` |
| `CLEAR COLUMN IN PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] CLEAR COLUMN column_name IN PARTITION partition_expr` |
| `FREEZE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] FREEZE [PARTITION partition_expr] [WITH NAME 'backup_name']` |
| `UNFREEZE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] UNFREEZE [PARTITION 'part_expr'] WITH NAME 'backup_name'` |
| `CLEAR INDEX IN PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] CLEAR INDEX index_name IN PARTITION partition_expr` |
| `FETCH PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] FETCH PARTITION/PART partition_expr FROM 'path-in-zookeeper'` |
| `MOVE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] MOVE PARTITION/PART partition_expr TO DISK/VOLUME 'disk_name'` |
| `UPDATE IN PARTITION` | `ALTER TABLE [db.]table [ON CLUSTER cluster] UPDATE column1 = expr1 [, ...] [IN PARTITION partition_expr] WHERE filter_expr` |
| `DELETE IN PARTITION` | `ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE [IN PARTITION partition_expr] WHERE filter_expr` |
| **Action** | **Description** |
|------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| `DETACH PARTITION/PART` | `ALTER TABLE table_name [ON CLUSTER cluster] DETACH PARTITION/PART partition_expr` |
| `DROP PARTITION/PART` | `ALTER TABLE table_name [ON CLUSTER cluster] DROP PARTITION/PART partition_expr` | >
| `DROP DETACHED PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] DROP DETACHED PARTITION/PART partition_expr` |
| `ATTACH PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] ATTACH PARTITION/PART partition_expr` |
| `ATTACH PARTITION FROM` | `ALTER TABLE table2 [ON CLUSTER cluster] ATTACH PARTITION partition_expr FROM table1` |
| `REPLACE PARTITION` | `ALTER TABLE table2 [ON CLUSTER cluster] REPLACE PARTITION partition_expr FROM table1` |
| `MOVE PARTITION TO TABLE` | `ALTER TABLE table_source [ON CLUSTER cluster] MOVE PARTITION partition_expr TO TABLE table_dest` |
| `CLEAR COLUMN IN PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] CLEAR COLUMN column_name IN PARTITION partition_expr` |
| `FREEZE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] FREEZE [PARTITION partition_expr] [WITH NAME 'backup_name']` |
| `UNFREEZE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] UNFREEZE [PARTITION 'part_expr'] WITH NAME 'backup_name'` |
| `CLEAR INDEX IN PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] CLEAR INDEX index_name IN PARTITION partition_expr` |
| `FETCH PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] FETCH PARTITION/PART partition_expr FROM 'path-in-zookeeper'` |
| `MOVE PARTITION` | `ALTER TABLE table_name [ON CLUSTER cluster] MOVE PARTITION/PART partition_expr TO DISK/VOLUME 'disk_name'` |
| `UPDATE IN PARTITION` | `ALTER TABLE [db.]table [ON CLUSTER cluster] UPDATE column1 = expr1 [, ...] [IN PARTITION partition_expr] WHERE filter_expr` |
| `DELETE IN PARTITION` | `ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE [IN PARTITION partition_expr] WHERE filter_expr` |
## REPLACE PARTITION
Expand Down

0 comments on commit b8054fb

Please sign in to comment.