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/01/08 09:17:44 UTC

[GitHub] [incubator-doris] DanyBin opened a new pull request #2707: add BE udf bitmap_or & bitmap_and

DanyBin opened a new pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707
 
 
   1.add BE udf bitmap_or & bitmap_and

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707#discussion_r364132233
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -387,7 +387,48 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     delete src_bitmap;
     return result;
 }
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
 
 Review comment:
   return null when input is null.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707#discussion_r364132900
 
 

 ##########
 File path: gensrc/script/doris_builtins_functions.py
 ##########
 @@ -610,7 +610,10 @@
         '_ZN5doris15BitmapFunctions12bitmap_countEPN9doris_udf15FunctionContextERKNS1_9StringValE'],
     [['bitmap_empty'], 'BITMAP', [],
         '_ZN5doris15BitmapFunctions12bitmap_emptyEPN9doris_udf15FunctionContextE'],
-
+    [['bitmap_or'], 'BITMAP', ['VARCHAR','VARCHAR'],
 
 Review comment:
   input should be BITMAP.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707#discussion_r364132341
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -387,7 +387,48 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     delete src_bitmap;
     return result;
 }
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
 
 Review comment:
   better to change src and dst to lhs and rhs.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay merged pull request #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
imay merged pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707#discussion_r364132476
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -387,7 +387,48 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     delete src_bitmap;
     return result;
 }
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
+    RoaringBitmap bitmap;
+    if (!src.is_null) {
+        if (src.len == 0) {
+            bitmap.merge(*reinterpret_cast<RoaringBitmap*>(src.ptr));
+        } else {
+            bitmap.merge(RoaringBitmap((char*)src.ptr));
+        }
+    }
+
+    if (!dst.is_null) {
+        if (dst.len == 0) {
+            bitmap.merge(*reinterpret_cast<RoaringBitmap*>(dst.ptr));
+        } else {
+            bitmap.merge(RoaringBitmap((char*)dst.ptr));
+        }
+    }
 
+    StringVal result(ctx,bitmap.size());
+    bitmap.serialize((char*)result.ptr);
+    return result;
+}
+StringVal BitmapFunctions::bitmap_and(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
 
 Review comment:
   rename src and dst to lhs and rhs

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] DanyBin commented on issue #2707: add BE udf bitmap_or & bitmap_and

Posted by GitBox <gi...@apache.org>.
DanyBin commented on issue #2707: add BE udf bitmap_or & bitmap_and
URL: https://github.com/apache/incubator-doris/pull/2707#issuecomment-571975136
 
 
   already updated
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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