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 800c2c4  [Docs] update data-model-rollup.md create table ddl (#6014)
800c2c4 is described below

commit 800c2c41bd0e0fcc30eee23d1c6cef8fda9029d7
Author: tarepanda1024 <[email protected]>
AuthorDate: Wed Jun 16 09:40:38 2021 +0800

    [Docs] update data-model-rollup.md create table ddl (#6014)
    
    update data-model-rollup.md create table ddl
---
 docs/en/getting-started/data-model-rollup.md    | 35 ++++++++++++-------------
 docs/zh-CN/getting-started/data-model-rollup.md |  8 +++---
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/docs/en/getting-started/data-model-rollup.md 
b/docs/en/getting-started/data-model-rollup.md
index b590bae..590a2be 100644
--- a/docs/en/getting-started/data-model-rollup.md
+++ b/docs/en/getting-started/data-model-rollup.md
@@ -76,9 +76,9 @@ CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
     `last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT 
"last visit date time",
     `cost` BIGINT SUM DEFAULT "0" COMMENT "user total cost",
     `max_dwell_time` INT MAX DEFAULT "0" COMMENT "user max dwell time",
-    `min_dwell_time` INT MIN DEFAULT "99999" COMMENT "user min dwell time",
+    `min_dwell_time` INT MIN DEFAULT "99999" COMMENT "user min dwell time"
 )
-AGGREGATE KEY(`user_id`, `date`, `timestamp`, `city`, `age`, `sex`)
+AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
 ... /* ignore Partition and Distribution */
 ;
 ```
@@ -240,10 +240,10 @@ In some multi-dimensional analysis scenarios, users are 
more concerned with how
 |---|---|---|---|
 | user_id | BIGINT | Yes | user id|
 | username | VARCHAR (50) | Yes | User nickname|
-| City | VARCHAR (20) | No | User City|
+| city | VARCHAR (20) | No | User City|
 | age | SMALLINT | No | User Age|
 | sex | TINYINT | No | User Gender|
-| Phone | LARGEINT | No | User Phone|
+| phone | LARGEINT | No | User Phone|
 | address | VARCHAR (500) | No | User Address|
 | register_time | DATETIME | No | user registration time|
 
@@ -253,16 +253,16 @@ This is a typical user base information table. There is 
no aggregation requireme
 CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
 (
 `user_id` LARGEINT NOT NULL COMMENT "用户id",
-"username" VARCHAR (50) NOT NULL COMMENT "25143;" 261651;"
-` City `VARCHAR (20) COMMENT `User City',
-"Age" SMALLINT COMMENT "29992;" 25143;"24180;" 40836 ",
+`username` VARCHAR (50) NOT NULL COMMENT "25143;" 261651;"
+`city` VARCHAR (20) COMMENT `User City',
+`age` SMALLINT COMMENT "29992;" 25143;"24180;" 40836 ",
 `sex` TINYINT COMMENT "用户性别",
 `phone` LARGEINT COMMENT "用户电话",
-'address ` VARCHAR (500) COMMENT'25143;',
-'register 'or'time' DATETIME COMMENT "29992;" 25143;"27880;" 20876;"26102;" 
38388;"
+`address` VARCHAR (500) COMMENT'25143;',
+`register_time` DATETIME COMMENT "29992;" 25143;"27880;" 20876;"26102;" 38388;"
 )
-Unique Key ("User", "User", "Name")
-... /* 省略 Partition 和 Distribution 信息 */
+Unique Key (`user_id`, `username`)
+... /* ignore Partition and Distribution  */
 ;
 ```
 
@@ -285,16 +285,15 @@ And table-building statements:
 CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
 (
 `user_id` LARGEINT NOT NULL COMMENT "用户id",
-"username" VARCHAR (50) NOT NULL COMMENT "25143;" 261651;"
-` City `VARCHAR (20) REPLACE COMMENT `User City',
-What do you say when you are young?
+`username` VARCHAR (50) NOT NULL COMMENT "25143;" 261651;"
+`city` VARCHAR (20) REPLACE COMMENT `User City',
 `sex` TINYINT REPLACE COMMENT "用户性别",
-"phone" LARGEINT REPLACE COMMENT "25143;"
+`phone` LARGEINT REPLACE COMMENT "25143;"
 `address` VARCHAR(500) REPLACE COMMENT "用户地址",
-'register 'or'time' DATETIME REPLACE COMMENT "29992;" 25143;"27880;" 
20876;"26102;"
+`register_time` DATETIME REPLACE COMMENT "29992;" 25143;"27880;" 20876;"26102;"
 )
-AGGREGATE KEY(`user_id`, `user_name`)
-... /* 省略 Partition 和 Distribution 信息 */
+AGGREGATE KEY(`user_id`, `username`)
+... /* ignore Partition and Distribution */
 ;
 ```
 
diff --git a/docs/zh-CN/getting-started/data-model-rollup.md 
b/docs/zh-CN/getting-started/data-model-rollup.md
index f442904..6de46c0 100644
--- a/docs/zh-CN/getting-started/data-model-rollup.md
+++ b/docs/zh-CN/getting-started/data-model-rollup.md
@@ -76,9 +76,9 @@ CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
     `last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT 
"用户最后一次访问时间",
     `cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
     `max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
-    `min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间",
+    `min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
 )
-AGGREGATE KEY(`user_id`, `date`, `timestamp`, `city`, `age`, `sex`)
+AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
 ... /* 省略 Partition 和 Distribution 信息 */
 ;
 ```
@@ -261,7 +261,7 @@ CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
     `address` VARCHAR(500) COMMENT "用户地址",
     `register_time` DATETIME COMMENT "用户注册时间"
 )
-UNIQUE KEY(`user_id`, `user_name`)
+UNIQUE KEY(`user_id`, `username`)
 ... /* 省略 Partition 和 Distribution 信息 */
 ;
 ```
@@ -293,7 +293,7 @@ CREATE TABLE IF NOT EXISTS example_db.expamle_tbl
     `address` VARCHAR(500) REPLACE COMMENT "用户地址",
     `register_time` DATETIME REPLACE COMMENT "用户注册时间"
 )
-AGGREGATE KEY(`user_id`, `user_name`)
+AGGREGATE KEY(`user_id`, `username`)
 ... /* 省略 Partition 和 Distribution 信息 */
 ;
 ```

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to