This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new f992247779 [docs] update alter table doc (#8915)
f992247779 is described below
commit f992247779d2b191e866a35801fdce1a7fbf0540
Author: Hao Wang <[email protected]>
AuthorDate: Tue Apr 12 09:26:40 2022 +0800
[docs] update alter table doc (#8915)
---
.../sql-statements/Data Definition/ALTER TABLE.md | 14 ++++++++++++++
.../sql-statements/Data Definition/ALTER TABLE.md | 17 ++++++++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/docs/en/sql-reference/sql-statements/Data Definition/ALTER
TABLE.md b/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
index 984220a9c3..3cb5f5304a 100644
--- a/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
+++ b/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
@@ -228,6 +228,14 @@ under the License.
3. Modify the partition name
grammar:
RENAME PARTITION old_partition_name new_partition_name;
+
+ Replace supports swap data between two tables:
+ 1. swap data between two tables
+ geammar:
+ REPLACE WITH TABLE new_table [PROPERTIES('swap' = 'true')];
+ note:
+ 1. if swap is true, swap data between two tables.
+ 2. if swap is fasle, replace the old_table with the new_table, and
delete the new_table.
Bitmap index supports the following modifications:
1. create bitmap index
@@ -418,6 +426,12 @@ under the License.
3. Modify the partition named p1 in the table example_table to p2
ALTER TABLE example_table RENAME PARTITION p1 p2;
+
+ [replace]
+ 1. swap data between two tables
+ ALTER TABLE table1 REPLACE WITH TABLE table2;
+ 2. replace the table1 with the table2, and delete the table2.
+ ALTER TABLE table1 REPLACE WITH TABLE table2 PROPERTIES('swap' =
'false');
[index]
1. create index on table1 column siteid using bitmap
diff --git a/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER
TABLE.md b/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER
TABLE.md
index c5a4a3796b..9a11ef2a73 100644
--- a/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
+++ b/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
@@ -226,6 +226,14 @@ under the License.
3. 修改 partition 名称
语法:
RENAME PARTITION old_partition_name new_partition_name;
+
+ replace 支持对两个表进行原子的替换操作:
+ 1. 替换表
+ 语法:
+ REPLACE WITH TABLE new_table [PROPERTIES('swap' = 'true')];
+ 注意:
+ 1. 如果 swap 参数为 true,两表交换数据。
+ 2. 如果 swap 参数为 false,用 new_table 表中的数据替换 old_table 表中的数据,并删除
new_table 表。
bitmap index 支持如下几种修改方式
1. 创建bitmap 索引
@@ -233,7 +241,7 @@ under the License.
ADD INDEX [IF NOT EXISTS] index_name (column [, ...],) [USING
BITMAP] [COMMENT 'balabala'];
注意:
1. 目前仅支持bitmap 索引
- 1. BITMAP 索引仅在单列上创建
+ 2. BITMAP 索引仅在单列上创建
2. 删除索引
语法:
@@ -414,6 +422,13 @@ under the License.
3. 将表 example_table 中名为 p1 的 partition 修改为 p2
ALTER TABLE example_table RENAME PARTITION p1 p2;
+
+ [replace]
+ 1. 将 tabel1 和 table2 的数据互换
+ ALTER TABLE table1 REPLACE WITH TABLE table2;
+ 2. 用 table2 表中的数据替换 tabel1 表中的数据, 并删除 table2
+ ALTER TABLE table1 REPLACE WITH TABLE table2 PROPERTIES('swap' =
'false');
+
[index]
1. 在table1 上为siteid 创建bitmap 索引
ALTER TABLE table1 ADD INDEX [IF NOT EXISTS] index_name (siteid)
[USING BITMAP] COMMENT 'balabala';
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]