[New Stmt] Alter replication number for table (#3360)

This CL add new command to set replication number of table in one time.
```
alter table test_tbl set ("replication_num" = "3");
```
It changes replication num of a unpartitioned table.

and

```
alter table test_tbl set ("default.replication_num" = "3");
```

It changes default replication num of the specified table.
This commit is contained in:
xy720
2020-04-23 21:58:09 +08:00
committed by GitHub
parent a58bc1957e
commit 09eb40e356
12 changed files with 158 additions and 57 deletions

View File

@ -166,7 +166,7 @@ under the License.
1) index 中的所有列都要写出来
2) value 列在 key 列之后
6. 修改table的属性,目前支持修改bloom filter列, colocate_with 属性和dynamic_partition属性
6. 修改table的属性,目前支持修改bloom filter列, colocate_with 属性和dynamic_partition属性,replication_num和default.replication_num属性
语法:
PROPERTIES ("key"="value")
注意:
@ -198,6 +198,15 @@ under the License.
## example
[table]
1. 修改表的默认副本数量, 新建分区副本数量默认使用此值
ATLER TABLE example_db.my_table
SET ("default.replication_num" = "2");
2. 修改单分区表的实际副本数量(只限单分区表)
ALTER TABLE example_db.my_table
SET ("replication_num" = "3");
[partition]
1. 增加分区, 现有分区 [MIN, 2013-01-01),增加分区 [2013-01-01, 2014-01-01),使用默认分桶方式
ALTER TABLE example_db.my_table