This is an automated email from the ASF dual-hosted git repository. weixiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 3c140ae05b [fix] [docs] Fixed Use examples in sequence-column-manual.md file. (#10588) 3c140ae05b is described below commit 3c140ae05b2a6579c7e99d53a8e181181fe79a19 Author: cchux <13752331...@163.com> AuthorDate: Tue Jul 5 10:27:13 2022 +0800 [fix] [docs] Fixed Use examples in sequence-column-manual.md file. (#10588) * [fix] [docs] Fixed Use examples in sequence-column-manual.md file. Co-authored-by: 杨帅统 <yangshuait...@gaolvgo.com> Co-authored-by: spaces-x <weixiao5...@gmail.com> --- docs/en/docs/data-operate/update-delete/sequence-column-manual.md | 6 +++--- .../docs/data-operate/update-delete/sequence-column-manual.md | 7 ++++--- 2 files changed, 7 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 306992fc9f..a748c837bb 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 @@ -209,10 +209,10 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ | user_id | date | group_id | modify_date | keyword | +---------+------------+----------+-------------+---------+ -| 1 | 2020-02-22 | 1 | 2020-03-05 | c | +| 1 | 2020-02-22 | 1 | 2020-02-23 | b | +---------+------------+----------+-------------+---------+ ``` -Because the sequence column for the newly imported data are all smaller than the values already in the table, they cannot be replaced +In this import, the b is eventually retained in the keyword column because the value of the sequence column (the value in modify_date) is the maximum value: '2020-02-23'. Try importing the following data again ``` @@ -228,5 +228,5 @@ MySQL [test]> select * from test_table; | 1 | 2020-02-22 | 1 | 2020-03-23 | w | +---------+------------+----------+-------------+---------+ ``` -At this point, you can replace the original data in the table +At this point, you can replace the original data in the table. To sum up, if the key is the same in the imported data of the same batch, the sequence column value will be compared. Select the record with the largest value to import into the Doris table,and the sequence column between different batches will not work. 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 073ff10f58..23f568313f 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 @@ -226,11 +226,12 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ | user_id | date | group_id | modify_date | keyword | +---------+------------+----------+-------------+---------+ -| 1 | 2020-02-22 | 1 | 2020-03-05 | c | +| 1 | 2020-02-22 | 1 | 2020-02-23 | b | +---------+------------+----------+-------------+---------+ ``` +在这次导入的数据中,因sequence column的值(也就是modify_date中的值)中'22020-02-23'为最大值,所以keyword列中最终保留了b。 -由于新导入的数据的sequence column都小于表中已有的值,无法替换 再尝试导入如下数据 +再尝试导入如下数据 ```text 1 2020-02-22 1 2020-02-22 a @@ -248,7 +249,7 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ ``` -此时就可以替换表中原有的数据 +此时就可以替换表中原有的数据。综上,在同批次导入数据中key相同会比较sequence列值,选择值最大的记录导入Doris表中,不同批次之间sequence列不起作用。 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org