This is an automated email from the ASF dual-hosted git repository.
jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 795a2cd5ca9 Random Distribution
795a2cd5ca9 is described below
commit 795a2cd5ca94f75a547f1b0144a518660c8be1a9
Author: jiafeng.zhang <[email protected]>
AuthorDate: Mon Jul 25 21:14:02 2022 +0800
Random Distribution
Random Distribution
---
.../Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md | 6 ++++++
.../Data-Definition-Statements/Create/CREATE-TABLE.md | 7 +++----
.../Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md | 6 ++++++
.../Data-Definition-Statements/Create/CREATE-TABLE.md | 10 ++++++++--
4 files changed, 23 insertions(+), 6 deletions(-)
diff --git
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
index a8f83b4c079..bd85ed5fbfe 100644
---
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
+++
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
@@ -105,6 +105,12 @@ ALTER TABLE example_db.my_table ENABLE FEATURE
"SEQUENCE_LOAD" WITH PROPERTIES (
ALTER TABLE example_db.my_table MODIFY DISTRIBUTION DISTRIBUTED BY HASH(k1)
BUCKETS 50;
```
+9. Change the bucketing mode of the table from Hash Distribution to Random
Distribution
+
+```
+ALTER TABLE example_db.my_table set ("distribution_type" = "random");
+```
+
9. Modify table comments
```sql
diff --git
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
index 807c58bfbe4..5c216b10b58 100644
---
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
+++
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
@@ -228,10 +228,9 @@ distribution_info
* `distribution_desc`
- Define the data bucketing method.
-
- `DISTRIBUTED BY HASH (k1[,k2 ...]) [BUCKETS num]`
-
+ 1. Hash Syntax: `DISTRIBUTED BY HASH (k1[,k2 ...]) [BUCKETS num]` Explain:
Hash bucketing using the specified key column.
+ 2. Random Syntax: `DISTRIBUTED BY RANDOM [BUCKETS num]` Explain: Use
random numbers for bucketing. Suggestion: It is recommended to use random
bucketing when there is no suitable key for hash bucketing to make the data of
the table evenly distributed.
+
* `rollup_list`
Multiple materialized views (ROLLUP) can be created at the same time as
the table is built.
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
index 8047dce7a3f..c7d73226d00 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PROPERTY.md
@@ -105,6 +105,12 @@ ALTER TABLE example_db.my_table ENABLE FEATURE
"SEQUENCE_LOAD" WITH PROPERTIES (
ALTER TABLE example_db.my_table MODIFY DISTRIBUTION DISTRIBUTED BY HASH(k1)
BUCKETS 50;
```
+9. 将表的分桶方式由 Hash Distribution 改为 Random Distribution
+
+```sql
+ALTER TABLE example_db.my_table set ("distribution_type" = "random");
+```
+
9. 修改表注释
```sql
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
index ae017e0f043..588eb6f01c0 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
@@ -229,10 +229,16 @@ distribution_info
* `distribution_desc`
- 定义数据分桶方式。
+ 1. Hash 分桶 语法: `DISTRIBUTED BY HASH (k1[,k2 ...]) [BUCKETS num]`
- `DISTRIBUTED BY HASH (k1[,k2 ...]) [BUCKETS num]`
+ 说明: 使用指定的 key 列进行哈希分桶。
+ 1. Random 分桶 语法: `DISTRIBUTED BY RANDOM [BUCKETS num]`
+
+ 说明: 使用随机数进行分桶
+
+ 建议: 当没有合适的key做哈希分桶使得表的数据均匀分布的时候,建议使用RANDOM分桶方式。
+
* `rollup_list`
建表的同时可以创建多个物化视图(ROLLUP)。
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]