From e43f6ae0a8dd0b26767d64b41eb1c863d087a173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?caiconghui=20=5B=E8=94=A1=E8=81=AA=E8=BE=89=5D?= Date: Thu, 20 Aug 2020 15:09:27 +0800 Subject: [PATCH 1/3] [Doc] add in predicate support content in delete-manual.md --- docs/en/administrator-guide/load-data/delete-manual.md | 10 ++++++++-- .../administrator-guide/load-data/delete-manual.md | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/en/administrator-guide/load-data/delete-manual.md b/docs/en/administrator-guide/load-data/delete-manual.md index b080395a941b47..6e59f5f08b2b6d 100644 --- a/docs/en/administrator-guide/load-data/delete-manual.md +++ b/docs/en/administrator-guide/load-data/delete-manual.md @@ -63,7 +63,7 @@ The following describes the parameters used in the delete statement: 说明: -1. The type of `OP` in the WHERE condition can only include `=, >, <, > =, < =,!=`. Currently, where key in (value1, Value2, value3) mode is not supported yet, may be added this support later. +1. The type of `OP` in the WHERE condition can only include `=, >, <, >=, <=, !=, in, not in`. 2. The column in the WHERE condition can only be the `key` column. 3. Cannot delete when the `key` column does not exist in any rollup table. 4. Each condition in WHERE condition can only be realated by `and`. If you want `or`, you are suggested to write these conditions into two delete statements. @@ -92,7 +92,7 @@ The delete command is an SQL command, and the returned results are synchronous. ``` mysql> delete from test_tbl PARTITION p1 where k1 = 1; Query OK, 0 rows affected (0.04 sec) - {'label':'delete_e7830c72-eb14-4cb9-bbb6-eebd4511d251', 'status':'VISIBLE', 'txnId':'4005', 'err':'delete job is committed but may be taking effect later' } + {'label':'delete_e7830c72-eb14-4cb9-bbb6-eebd4511d251', 'status':'COMMITTED', 'txnId':'4005', 'err':'delete job is committed but may be taking effect later' } ``` The result will return a JSON string at the same time: @@ -162,6 +162,12 @@ In general, Doris's deletion timeout is limited from 30 seconds to 5 minutes. Th * query_timeout Because delete itself is an SQL command, the deletion statement is also limited by the session variables, and the timeout is also affected by the session value `query'timeout`. You can increase the value by `set query'timeout = xxx`. + +**InPredicate configuration** + +* max_allowed_in_element_num_of_delete + + If the user needs to take a lot of elements when using the in predicate, the user can adjust the upper limit of the allowed in elements number, and the default value is 1024. ## Show delete history diff --git a/docs/zh-CN/administrator-guide/load-data/delete-manual.md b/docs/zh-CN/administrator-guide/load-data/delete-manual.md index fd123cc12626cf..4b6aa54b9437f7 100644 --- a/docs/zh-CN/administrator-guide/load-data/delete-manual.md +++ b/docs/zh-CN/administrator-guide/load-data/delete-manual.md @@ -62,7 +62,7 @@ DELETE FROM my_table PARTITION p1 WHERE k1 < 3 AND k2 = "abc"; 说明: -1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`,目前暂时不支持 where key in (value1, value2, value3) 的方式选定范围,后续将加上此功能。 +1. `Where`语句中的op的类型可包括`=, >, <, >=, <=, !=, in, not in`。 2. `Where`语句中的列只能是`key`列 3. 当选定的`key`列不存在某个rollup表内时,无法进行delete 4. 条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中 @@ -90,7 +90,7 @@ Delete命令是一个SQL命令,返回结果是同步的,分为以下几种 ``` mysql> delete from test_tbl PARTITION p1 where k1 = 1; Query OK, 0 rows affected (0.04 sec) - {'label':'delete_e7830c72-eb14-4cb9-bbb6-eebd4511d251', 'status':'VISIBLE', 'txnId':'4005', 'err':'delete job is committed but may be taking effect later' } + {'label':'delete_e7830c72-eb14-4cb9-bbb6-eebd4511d251', 'status':'COMMITTED', 'txnId':'4005', 'err':'delete job is committed but may be taking effect later' } ``` 结果会同时返回一个json字符串: @@ -158,6 +158,12 @@ Delete命令是一个SQL命令,返回结果是同步的,分为以下几种 因为delete本身是一个SQL命令,因此删除语句也会受session限制,timeout还受Session中的`query_timeout`值影响,可以通过`SET query_timeout = xxx`来增加超时时间,单位是秒。 +**IN谓词配置** + +* max_allowed_in_element_num_of_delete + + 如果用户在使用in谓词时需要占用的元素比较多,用户可以通过此项调整允许携带的元素上限,默认值为1024。 + ## 查看历史记录 1. 用户可以通过show delete语句查看历史上已执行完成的删除记录 From 33c1c97c50f0f13d6b5e6e77037fc9f08d7ea489 Mon Sep 17 00:00:00 2001 From: caiconghui Date: Thu, 20 Aug 2020 23:17:20 +0800 Subject: [PATCH 2/3] fix doc content by review --- docs/en/administrator-guide/load-data/delete-manual.md | 8 ++++---- docs/zh-CN/administrator-guide/load-data/delete-manual.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/administrator-guide/load-data/delete-manual.md b/docs/en/administrator-guide/load-data/delete-manual.md index 6e59f5f08b2b6d..67b8acc1e05491 100644 --- a/docs/en/administrator-guide/load-data/delete-manual.md +++ b/docs/en/administrator-guide/load-data/delete-manual.md @@ -145,13 +145,13 @@ The delete command is an SQL command, and the returned results are synchronous. In general, Doris's deletion timeout is limited from 30 seconds to 5 minutes. The specific time can be adjusted through the following configuration items -* tablet\_delete\_timeout\_second +* `tablet_delete_timeout_second` The timeout of delete itself can be elastically changed by the number of tablets in the specified partition. This configuration represents the average timeout contributed by a tablet. The default value is 2. Assuming that there are 5 tablets under the specified partition for this deletion, the timeout time available for the deletion is 10 seconds. Because the minimum timeout is 30 seconds which is higher than former timeout time, the final timeout is 30 seconds. -* load\_straggler\_wait\_second +* `load_straggler_wait_second` If the user estimates a large amount of data, so that the upper limit of 5 minutes is insufficient, the user can adjust the upper limit of timeout through this item, and the default value is 300. @@ -159,13 +159,13 @@ In general, Doris's deletion timeout is limited from 30 seconds to 5 minutes. Th `TIMEOUT = MIN(load_straggler_wait_second, MAX(30, tablet_delete_timeout_second * tablet_num))` -* query_timeout +* `query_timeout` Because delete itself is an SQL command, the deletion statement is also limited by the session variables, and the timeout is also affected by the session value `query'timeout`. You can increase the value by `set query'timeout = xxx`. **InPredicate configuration** -* max_allowed_in_element_num_of_delete +* `max_allowed_in_element_num_of_delete` If the user needs to take a lot of elements when using the in predicate, the user can adjust the upper limit of the allowed in elements number, and the default value is 1024. diff --git a/docs/zh-CN/administrator-guide/load-data/delete-manual.md b/docs/zh-CN/administrator-guide/load-data/delete-manual.md index 4b6aa54b9437f7..f020eeaf4c06d9 100644 --- a/docs/zh-CN/administrator-guide/load-data/delete-manual.md +++ b/docs/zh-CN/administrator-guide/load-data/delete-manual.md @@ -140,13 +140,13 @@ Delete命令是一个SQL命令,返回结果是同步的,分为以下几种 总体来说,Doris的删除作业的超时时间限制在30秒到5分钟时间内,具体时间可通过下面配置项调整 -* tablet\_delete\_timeout\_second +* `tablet_delete_timeout_second` delete自身的超时时间是可受指定分区下tablet的数量弹性改变的,此项配置为平均一个tablet所贡献的timeout时间,默认值为2。 假设此次删除所指定分区下有5个tablet,那么可提供给delete的timeout时间为10秒,由于低于最低超时时间30秒,因此最终超时时间为30秒。 -* load\_straggler\_wait\_second +* `load_straggler_wait_second` 如果用户预估的数据量确实比较大,使得5分钟的上限不足时,用户可以通过此项调整timeout上限,默认值为300。 @@ -154,13 +154,13 @@ Delete命令是一个SQL命令,返回结果是同步的,分为以下几种 `TIMEOUT = MIN(load_straggler_wait_second, MAX(30, tablet_delete_timeout_second * tablet_num))` -* query_timeout +* `query_timeout` 因为delete本身是一个SQL命令,因此删除语句也会受session限制,timeout还受Session中的`query_timeout`值影响,可以通过`SET query_timeout = xxx`来增加超时时间,单位是秒。 **IN谓词配置** -* max_allowed_in_element_num_of_delete +* `max_allowed_in_element_num_of_delete` 如果用户在使用in谓词时需要占用的元素比较多,用户可以通过此项调整允许携带的元素上限,默认值为1024。 From ee136456bb235e1c0861a6ecd5de8db506f0ae4b Mon Sep 17 00:00:00 2001 From: caiconghui Date: Thu, 20 Aug 2020 23:20:05 +0800 Subject: [PATCH 3/3] fix --- docs/en/administrator-guide/load-data/delete-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/administrator-guide/load-data/delete-manual.md b/docs/en/administrator-guide/load-data/delete-manual.md index 67b8acc1e05491..692ca03d8e21cd 100644 --- a/docs/en/administrator-guide/load-data/delete-manual.md +++ b/docs/en/administrator-guide/load-data/delete-manual.md @@ -61,7 +61,7 @@ The following describes the parameters used in the delete statement: The conditiona of the delete statement. All delete statements must specify a where condition. -说明: +Explanation: 1. The type of `OP` in the WHERE condition can only include `=, >, <, >=, <=, !=, in, not in`. 2. The column in the WHERE condition can only be the `key` column.