This is an automated email from the ASF dual-hosted git repository. morningman 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 98c214e43a [doc] add create table statement for create-materialized-view doc (#10029) 98c214e43a is described below commit 98c214e43ac0137b63fb80500a69ac2cbe199708 Author: zy-kkk <815574...@qq.com> AuthorDate: Thu Jun 9 20:16:46 2022 -0500 [doc] add create table statement for create-materialized-view doc (#10029) --- .../Create/CREATE-MATERIALIZED-VIEW.md | 12 ++++++++++++ .../Create/CREATE-MATERIALIZED-VIEW.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md index ae242e5dae..643638870f 100644 --- a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md +++ b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md @@ -102,6 +102,18 @@ mysql> desc duplicate_table; | k4 | BIGINT | Yes | true | N/A | | +-------+--------+------+------+---------+-------+ ```` +```sql +create table duplicate_table( + k1 int null, + k2 int null, + k3 bigint null, + k4 bigint null +) +duplicate key (k1,k2,k3,k4) +distributed BY hash(k4) buckets 3 +properties("replication_num" = "1"); +``` +attention:The partition and distributed columns must be key column in mv 1. Create a materialized view that contains only the columns of the original table (k1, k2) diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md index 4b2074dcc1..2b552930c7 100644 --- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md +++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md @@ -102,6 +102,18 @@ mysql> desc duplicate_table; | k4 | BIGINT | Yes | true | N/A | | +-------+--------+------+------+---------+-------+ ``` +```sql +create table duplicate_table( + k1 int null, + k2 int null, + k3 bigint null, + k4 bigint null +) +duplicate key (k1,k2,k3,k4) +distributed BY hash(k4) buckets 3 +properties("replication_num" = "1"); +``` +注意:分区列和分桶列必须作为物化视图中的key列 1. 创建一个仅包含原始表 (k1, k2)列的物化视图 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org