This is an automated email from the ASF dual-hosted git repository. diwu pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new 724bc3c0f1 delete orthogonal_bitmap_expr_calculate and orthogonal_bitmap_expr_calculate_count (#21016) 724bc3c0f1 is described below commit 724bc3c0f167d9d382166d9695f12128e305ff67 Author: Jron <737507...@qq.com> AuthorDate: Tue Jun 20 18:14:37 2023 +0800 delete orthogonal_bitmap_expr_calculate and orthogonal_bitmap_expr_calculate_count (#21016) --- docs/en/docs/advanced/orthogonal-bitmap-manual.md | 42 ------------------- .../orthogonal_bitmap_expr_calculate.md | 47 ---------------------- .../orthogonal_bitmap_expr_calculate_count.md | 47 ---------------------- .../docs/advanced/orthogonal-bitmap-manual.md | 42 ------------------- .../orthogonal_bitmap_expr_calculate.md | 47 ---------------------- .../orthogonal_bitmap_expr_calculate_count.md | 47 ---------------------- 6 files changed, 272 deletions(-) diff --git a/docs/en/docs/advanced/orthogonal-bitmap-manual.md b/docs/en/docs/advanced/orthogonal-bitmap-manual.md index 2fb9c65eb9..9997ea2215 100644 --- a/docs/en/docs/advanced/orthogonal-bitmap-manual.md +++ b/docs/en/docs/advanced/orthogonal-bitmap-manual.md @@ -141,36 +141,6 @@ Explain: on the basis of this table schema, this function is divided into two layers. In the first layer, be nodes (update and serialize) merge all the bitmaps, and then count the resulting bitmaps. The count values are serialized and sent to the second level be nodes (merge and finalize). In the second layer, the be nodes are used to calculate the sum of all the count values from the first level nodes -#### orthogonal_bitmap_expr_calculate - -Compute the function by computing the intersection, union and difference set of the expression bitmap. - -Syntax: - -orthogonal_bitmap_expr_calculate(bitmap_column, filter_column, input_string) - -Parameters: - -the first parameter is the Bitmap column, the second parameter is the dimension column used for filtering, that is, the calculated key column, and the third parameter is the calculation expression string, which means that the bitmap intersection and union difference expression is calculated according to the key column - -the calculators supported by the expression: & represents intersection calculation, | represents union calculation, - represents difference calculation, ^ represents XOR calculation, and \ represents escape characters - -Explain: - -the aggregation of query planning is divided into two layers. The first layer of be aggregation node calculation includes init, update, and serialize steps. The second layer of be aggregation node calculation includes merge and finalize steps. In the first layer of be node, the input string is parsed in the init phase, which is converted into a suffix expression (inverse Polish), parses the calculated key value, and initializes it in the map<key, bitmap>structure; In the update phase, th [...] - -#### orthogonal_bitmap_expr_calculate_count - -Compute the count function by computing the intersection, union and difference set of the expression bitmap. The syntax and parameters is the same as orthogonal_bitmap_expr_calculate - -Syntax: - -orthogonal_bitmap_expr_calculate_count(bitmap_column, filter_column, input_string) - -Explain: - -the aggregation of query planning is divided into two layers. The first layer of be aggregation node calculation includes init, update, and serialize steps. The second layer of be aggregation node calculation includes merge and finalize steps. In the first layer of be node, the input string is parsed in the init phase, converted to suffix expression Formula (inverse Polish formula), parse the calculated key value and initialize it in the map<key, bitmap>structure; In the update phase, th [...] - ### Suitable for the scene It is consistent with the scenario of orthogonal calculation of bitmap, such as calculation retention, funnel, user portrait, etc. @@ -188,15 +158,3 @@ Calculate the deduplication value for user_id: ``` select orthogonal_bitmap_union_count(user_id) from user_tag_bitmap where tag in (13080800, 11110200); ``` - -Bitmap cross merge difference set hybrid computing: - -``` -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -Note: 1000, 20000, 30000 plastic tags represent different labels of users -``` - -``` -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); -Note: 'A:a/b', 'B:2-4', etc. are string types tag, representing different labels of users, where 'B:2-4' needs to be escaped as'B:2\\-4' -``` diff --git a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md deleted file mode 100644 index e530de904d..0000000000 --- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -{ -"title": "orthogonal_bitmap_expr_calculate", -"language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## orthogonal_bitmap_expr_calculate -### description -#### Syntax - -`BITMAP ORTHOGONAL_BITMAP_EXPR_CALCULATE(bitmap_column, column_to_filter, input_string)` -The first parameter is the Bitmap column, the second parameter is the dimension column used for filtering, that is, the calculated key column, and the third parameter is the calculation expression string, meaning that the bitmap intersection, union, and difference set expression is calculated according to the key column -The calculators supported by the expression:&represents intersection calculation, | represents union calculation, - represents difference calculation, ^ represents XOR calculation, and \ represents escape characters - -### example - -``` -select orthogonal_bitmap_expr_calculate(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -Note: 1000, 20000, 30000 plastic tags represent different labels of users -``` - -``` -select orthogonal_bitmap_expr_calculate(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); -Note: 'A:a/b', 'B:2-4', etc. are string types tag, representing different labels of users, where 'B:2-4' needs to be escaped as'B:2\\-4' -``` - -### keywords - - ORTHOGONAL_BITMAP_EXPR_CALCULATE,BITMAP diff --git a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md deleted file mode 100644 index b7a34ff296..0000000000 --- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -{ -"title": "orthogonal_bitmap_expr_calculate_count", -"language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## orthogonal_bitmap_expr_calculate_count -### description -#### Syntax - -`BITMAP ORTHOGONAL_BITMAP_EXPR_CALCULATE_COUNT(bitmap_column, column_to_filter, input_string)` -Calculate the bitmap intersection, union and difference set of expressions to calculate the count function. The first parameter is the Bitmap column, the second parameter is the dimension column used for filtering, that is, the calculated key column, and the third parameter is the calculation expression string, meaning that the bitmap intersection, union and difference set expression is calculated according to the key column -The calculators supported by the expression:&represents intersection calculation, | represents union calculation, - represents difference calculation, ^ represents XOR calculation, and \ represents escape characters - -### example - -``` -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -Note: 1000, 20000, 30000 plastic tags represent different labels of users -``` - -``` -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); -Note: 'A:a/b', 'B:2-4', etc. are string types tag, representing different labels of users, where 'B:2-4' needs to be escaped as'B:2\\-4' -``` - -### keywords - - ORTHOGONAL_BITMAP_EXPR_CALCULATE_COUNT,BITMAP diff --git a/docs/zh-CN/docs/advanced/orthogonal-bitmap-manual.md b/docs/zh-CN/docs/advanced/orthogonal-bitmap-manual.md index 1cdf4ba15f..a89e5e9253 100644 --- a/docs/zh-CN/docs/advanced/orthogonal-bitmap-manual.md +++ b/docs/zh-CN/docs/advanced/orthogonal-bitmap-manual.md @@ -145,36 +145,6 @@ orthogonal_bitmap_union_count(bitmap_column) 查询规划上分2层,在第一层be节点(update、serialize)对所有bitmap求并集,再对并集的结果bitmap求count,count值序列化后发送至第二层be节点(merge、finalize),在第二层be节点对所有来源于第一层节点的count值循环求sum -#### orthogonal_bitmap_expr_calculate - -求表达式bitmap交并差集合计算函数。 - -语法: - -orthogonal_bitmap_expr_calculate(bitmap_column, filter_column, input_string) - -参数: - -第一个参数是Bitmap列,第二个参数是用来过滤的维度列,即计算的key列,第三个参数是计算表达式字符串,含义是依据key列进行bitmap交并差集表达式计算 - -表达式支持的计算符:& 代表交集计算,| 代表并集计算,- 代表差集计算, ^ 代表异或计算,\ 代表转义字符 - -说明: - -查询规划上聚合分2层,第一层be聚合节点计算包括init、update、serialize步骤,第二层be聚合节点计算包括merge、finalize步骤。在第一层be节点,init阶段解析input_string字符串,转换为后缀表达式(逆波兰式),解析出计算key值,并在map<key, bitmap>结构中初始化;update阶段,底层内核scan维度列(filter_column)数据后回调update函数,然后以计算key为单位对上一步的map结构中的bitmap进行聚合;serialize阶段,根据后缀表达式,解析出计算key列的bitmap,利用栈结构先进后出原则,进行bitmap交并差集合计算,然后对最终的结果bitmap序列化后发送至第二层聚合be节点。在第二层聚合be节点,对所有来源于第一层节点的bitmap值求并集,并返回最终bitmap结果 - -#### orthogonal_bitmap_expr_calculate_count - -求表达式bitmap交并差集合计算count函数, 语法和参数同orthogonal_bitmap_expr_calculate。 - -语法: - -orthogonal_bitmap_expr_calculate_count(bitmap_column, filter_column, input_string) - -说明: - -查询规划上聚合分2层,第一层be聚合节点计算包括init、update、serialize步骤,第二层be聚合节点计算包括merge、finalize步骤。在第一层be节点,init阶段解析input_string字符串,转换为后缀表达式(逆波兰式),解析出计算key值,并在map<key, bitmap>结构中初始化;update阶段,底层内核scan维度列(filter_column)数据后回调update函数,然后以计算key为单位对上一步的map结构中的bitmap进行聚合;serialize阶段,根据后缀表达式,解析出计算key列的bitmap,利用栈结构先进后出原则,进行bitmap交并差集合计算,然后对最终的结果bitmap的count值序列化后发送至第二层聚合be节点。在第二层聚合be节点,对所有来源于第一层节点的count值求加和,并返回最终count结果。 - ### 使用场景 符合对bitmap进行正交计算的场景,如在用户行为分析中,计算留存,漏斗,用户画像等。 @@ -191,15 +161,3 @@ orthogonal_bitmap_expr_calculate_count(bitmap_column, filter_column, input_strin ```sql select orthogonal_bitmap_union_count(user_id) from user_tag_bitmap where tag in (13080800, 11110200); ``` - -bitmap交并差集合混合计算: - -```sql -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -注:1000、20000、30000等整形tag,代表用户不同标签 -``` - -```sql -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); - 注:'A:a/b', 'B:2-4'等是字符串类型tag,代表用户不同标签, 其中'B:2-4'需要转义成'B:2\\-4' -``` diff --git a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md deleted file mode 100644 index a8087b850b..0000000000 --- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -{ -"title": "orthogonal_bitmap_expr_calculate", -"language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## orthogonal_bitmap_expr_calculate -### description -#### Syntax - -`BITMAP ORTHOGONAL_BITMAP_EXPR_CALCULATE(bitmap_column, column_to_filter, input_string)` -求表达式bitmap交并差集合计算函数, 第一个参数是Bitmap列,第二个参数是用来过滤的维度列,即计算的key列,第三个参数是计算表达式字符串,含义是依据key列进行bitmap交并差集表达式计算 -表达式支持的计算符:& 代表交集计算,| 代表并集计算,- 代表差集计算, ^ 代表异或计算,\ 代表转义字符 - -### example - -```sql -select orthogonal_bitmap_expr_calculate(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -注:1000、20000、30000等整形tag,代表用户不同标签 -``` - -```sql -select orthogonal_bitmap_expr_calculate(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); - 注:'A:a/b', 'B:2-4'等是字符串类型tag,代表用户不同标签, 其中'B:2-4'需要转义成'B:2\\-4' -``` - -### keywords - - ORTHOGONAL_BITMAP_EXPR_CALCULATE,BITMAP diff --git a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md deleted file mode 100644 index bca01c6b16..0000000000 --- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/orthogonal_bitmap_expr_calculate_count.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -{ -"title": "orthogonal_bitmap_expr_calculate_count", -"language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## orthogonal_bitmap_expr_calculate_count -### description -#### Syntax - -`BITMAP ORTHOGONAL_BITMAP_EXPR_CALCULATE_COUNT(bitmap_column, column_to_filter, input_string)` -求表达式bitmap交并差集合计算count函数, 第一个参数是Bitmap列,第二个参数是用来过滤的维度列,即计算的key列,第三个参数是计算表达式字符串,含义是依据key列进行bitmap交并差集表达式计算 -表达式支持的计算符:& 代表交集计算,| 代表并集计算,- 代表差集计算, ^ 代表异或计算,\ 代表转义字符 - -### example - -```sql -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(833736|999777)&(1308083|231207)&(1000|20000-30000)') from user_tag_bitmap where tag in (833736,999777,130808,231207,1000,20000,30000); -注:1000、20000、30000等整形tag,代表用户不同标签 -``` - -```sql -select orthogonal_bitmap_expr_calculate_count(user_id, tag, '(A:a/b|B:2\\-4)&(C:1-D:12)&E:23') from user_str_tag_bitmap where tag in ('A:a/b', 'B:2-4', 'C:1', 'D:12', 'E:23'); - 注:'A:a/b', 'B:2-4'等是字符串类型tag,代表用户不同标签, 其中'B:2-4'需要转义成'B:2\\-4' -``` - -### keywords - - ORTHOGONAL_BITMAP_EXPR_CALCULATE_COUNT,BITMAP --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org