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/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 9217223cc5 [doc] update sequence en and zh-CN doc. (#10164) 9217223cc5 is described below commit 9217223cc5e990155c88a5d8ff559939135b4da9 Author: smallhibiscus <844981...@qq.com> AuthorDate: Thu Jun 16 09:32:52 2022 +0800 [doc] update sequence en and zh-CN doc. (#10164) * update sequence en and zh-CN doc. --- .../update-delete/sequence-column-manual.md | 26 +++++++++++++++++++--- .../update-delete/sequence-column-manual.md | 26 +++++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/data-operate/update-delete/sequence-column-manual.md b/docs/en/docs/data-operate/update-delete/sequence-column-manual.md index abfe003a7a..306992fc9f 100644 --- a/docs/en/docs/data-operate/update-delete/sequence-column-manual.md +++ b/docs/en/docs/data-operate/update-delete/sequence-column-manual.md @@ -136,6 +136,26 @@ If `function_column.sequence_type` is set when creating a new table, the new tab Let's take the stream Load as an example to show how to use it 1. Create a table that supports sequence column. +Create the test_table data table of the unique model and specify that the type of the specified sequence column is Date + +```sql +CREATE TABLE test.test_table +( + user_id bigint, + date date, + group_id bigint, + modify_date date, + keyword VARCHAR(128) +) +UNIQUE KEY(user_id, date, group_id) +DISTRIBUTED BY HASH (user_id) BUCKETS 32 +PROPERTIES( + "function_column.sequence_type" = 'Date', + "replication_num" = "1", + "in_memory" = "false" +); +``` + The table structure is shown below ```sql MySQL > desc test_table; @@ -154,12 +174,12 @@ MySQL > desc test_table; Import the following data ``` -1 2020-02-22 1 2020-02-22 a +1 2020-02-22 1 2020-02-21 a 1 2020-02-22 1 2020-02-22 b 1 2020-02-22 1 2020-03-05 c 1 2020-02-22 1 2020-02-26 d -1 2020-02-22 1 2020-02-22 e -1 2020-02-22 1 2020-02-22 b +1 2020-02-22 1 2020-02-23 e +1 2020-02-22 1 2020-02-24 b ``` Take the Stream Load as an example here and map the sequence column to the modify_date column ```shell diff --git a/docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md b/docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md index 41135753a2..073ff10f58 100644 --- a/docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md +++ b/docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md @@ -143,6 +143,26 @@ PROPERTIES 1. 创建支持sequence column的表 +创建unique模型的test_table数据表,并指定指定sequence列的类型为Date + +```sql +CREATE TABLE test.test_table +( + user_id bigint, + date date, + group_id bigint, + modify_date date, + keyword VARCHAR(128) +) +UNIQUE KEY(user_id, date, group_id) +DISTRIBUTED BY HASH (user_id) BUCKETS 32 +PROPERTIES( + "function_column.sequence_type" = 'Date', + "replication_num" = "1", + "in_memory" = "false" +); +``` + 表结构如下: ```sql @@ -163,12 +183,12 @@ MySQL > desc test_table; 导入如下数据 ```text -1 2020-02-22 1 2020-02-22 a +1 2020-02-22 1 2020-02-21 a 1 2020-02-22 1 2020-02-22 b 1 2020-02-22 1 2020-03-05 c 1 2020-02-22 1 2020-02-26 d -1 2020-02-22 1 2020-02-22 e -1 2020-02-22 1 2020-02-22 b +1 2020-02-22 1 2020-02-23 e +1 2020-02-22 1 2020-02-24 b ``` 此处以stream load为例, 将sequence column映射为modify_date列 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org