You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/05/14 04:08:55 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #3571: Support bitmap_intersect

EmmyMiao87 commented on a change in pull request #3571:
URL: https://github.com/apache/incubator-doris/pull/3571#discussion_r424859624



##########
File path: be/src/exprs/bitmap_function.cpp
##########
@@ -343,14 +367,19 @@ StringVal BitmapFunctions::bitmap_hash(doris_udf::FunctionContext* ctx, const do
 }
 
 StringVal BitmapFunctions::bitmap_serialize(FunctionContext* ctx, const StringVal& src) {
-    auto src_bitmap = reinterpret_cast<BitmapValue*>(src.ptr);
-    StringVal result = serialize(ctx, src_bitmap);
-    delete src_bitmap;
-    return result;
+    if (src.is_null) {
+        BitmapValue src_bitmap;
+        return serialize(ctx, &src_bitmap);

Review comment:
       This serialize function is  multiplexed by finalize function in other bitmap function such as bitmap_union.




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



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