imay commented on a change in pull request #2752: Add be bitmap udf 
URL: https://github.com/apache/incubator-doris/pull/2752#discussion_r366652566
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -465,6 +465,44 @@ StringVal 
BitmapFunctions::bitmap_from_string(FunctionContext* ctx, const String
     return result;
 }
 
+BooleanVal BitmapFunctions::bitmap_contains(FunctionContext* ctx, const 
StringVal& src, const BigIntVal& input) {
+    if (src.is_null || input.is_null) {
+        return BooleanVal::null();
+    }
+
+    RoaringBitmap bitmap;
+    if (src.len == 0) {
+        bitmap.merge(*reinterpret_cast<RoaringBitmap*>(src.ptr));
 
 Review comment:
   This operation is wasteful.
   It is efficient to operate with src.ptr.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to