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 b298796f38a [doc](sequence)Modify sequence error documentation (#45) b298796f38a is described below commit b298796f38ac547ec594517d075062cf9df98eef Author: caoliang-web <71004656+caoliang-...@users.noreply.github.com> AuthorDate: Mon Aug 15 18:26:30 2022 +0800 [doc](sequence)Modify sequence error documentation (#45) * Modify sequence error documentation --- docs/data-operate/update-delete/sequence-column-manual.md | 8 +++----- .../current/data-operate/update-delete/sequence-column-manual.md | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/data-operate/update-delete/sequence-column-manual.md b/docs/data-operate/update-delete/sequence-column-manual.md index a748c837bb5..25e6359c668 100644 --- a/docs/data-operate/update-delete/sequence-column-manual.md +++ b/docs/data-operate/update-delete/sequence-column-manual.md @@ -209,11 +209,10 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ | user_id | date | group_id | modify_date | keyword | +---------+------------+----------+-------------+---------+ -| 1 | 2020-02-22 | 1 | 2020-02-23 | b | +| 1 | 2020-02-22 | 1 | 2020-03-05 | c | +---------+------------+----------+-------------+---------+ ``` -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 +In this import, the c is eventually retained in the keyword column because the value of the sequence column (the value in modify_date) in all imports is the maximum value: '2020-03-05'. Try importing the following data again ``` 1 2020-02-22 1 2020-02-22 a @@ -228,5 +227,4 @@ 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. 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. - +At this point, you can replace the original data in the table. To sum up, the sequence column will be compared among all the batches, the largest value of the same key will be imported into Doris table. diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/update-delete/sequence-column-manual.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/update-delete/sequence-column-manual.md index 36505cc6bcb..de7cad83d4c 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/update-delete/sequence-column-manual.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/update-delete/sequence-column-manual.md @@ -226,12 +226,11 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ | user_id | date | group_id | modify_date | keyword | +---------+------------+----------+-------------+---------+ -| 1 | 2020-02-22 | 1 | 2020-02-23 | b | +| 1 | 2020-02-22 | 1 | 2020-03-05 | c | +---------+------------+----------+-------------+---------+ ``` -在这次导入的数据中,因sequence column的值(也就是modify_date中的值)中'22020-02-23'为最大值,所以keyword列中最终保留了b。 -再尝试导入如下数据 +在这次导入的数据中,会比较所有已导入数据的sequence column(也就是modify_date),其中'2020-03-05'为最大值,所以keyword列中最终保留了c。再尝试导入如下数据 ```text 1 2020-02-22 1 2020-02-22 a @@ -249,7 +248,7 @@ MySQL [test]> select * from test_table; +---------+------------+----------+-------------+---------+ ``` -此时就可以替换表中原有的数据。综上,在同批次导入数据中key相同会比较sequence列值,选择值最大的记录导入Doris表中,不同批次之间sequence列不起作用。 +此时就可以替换表中原有的数据。综上,在导入过程中,会比较所有批次的sequence列值,选择值最大的记录导入Doris表中。 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org