imay commented on a change in pull request #1610: Add bitmap agg type and udaf URL: https://github.com/apache/incubator-doris/pull/1610#discussion_r316942512
########## File path: docs/documentation/cn/sql-reference/sql-functions/aggregate-functions/bitmap.md ########## @@ -0,0 +1,77 @@ +#BITMAP + +## description +### Syntax + +`TO_BITMAP(expr)` : 将TINYINT,SMALLINT和INT类型的列转为Bitmap + +`BITMAP_UNION(expr)` : 计算两个Bitmap的交集,返回值是序列化后的Bitmap值 + +`BITMAP_COUNT(expr)` : 计算Bitmap中不同值的个数 + +`BITMAP_UNION_INT(expr)` : 计算TINYINT,SMALLINT和INT类型的列中不同值的个数,返回值和 +COUNT(DISTINCT expr)相同 + + +注意: + + 1. TO_BITMAP 函数输入的类型必须是TINYINT,SMALLINT,INT + 2. BITMAP_UNION函数的参数目前仅支持: + - 聚合模型中聚合类型为BITMAP_UNION的列 + - TO_BITMAP 函数 + 3. 对聚合模型中聚合类型为BITMAP_UNION的列的COUNT DISTINCT查询,Doris会自动重写为BITMAP_COUNT(BITMAP_UNION(id2)) Review comment: If you change the code, you should remove the third article ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
