imay commented on a change in pull request #2418: Add intersect_count UDAF
URL: https://github.com/apache/incubator-doris/pull/2418#discussion_r357469917
##########
File path: be/src/exprs/bitmap_function.cpp
##########
@@ -117,11 +337,181 @@ StringVal
BitmapFunctions::bitmap_serialize(FunctionContext* ctx, const StringVa
return result;
}
+template<typename T, typename ValType>
+void BitmapFunctions::bitmap_intersect_init(FunctionContext* ctx, StringVal*
dst) {
+ dst->is_null = false;
+ dst->len = sizeof(BitmapIntersect<T>);
+ auto intersect = new BitmapIntersect<T>();
+
+ // constant args start from index 2
+ for (int i = 2; i < ctx->get_num_constant_args(); ++i) {
+ DCHECK(ctx->is_arg_constant(i));
Review comment:
Is it checked that arguments should be constant in Frontend? If it isn't
checked, something bad will happen if user give a illegal query.
----------------------------------------------------------------
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]