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/03 06:17:13 UTC

[GitHub] [incubator-doris] DanyBin opened a new pull request #2649: ADD BE UDF bitmap_and and bitmap_or

DanyBin opened a new pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649
 
 
   1. Add BE udf bitmap_and and bitmap_or
   2.Test environment, modify production 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] DanyBin commented on a change in pull request #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
DanyBin commented on a change in pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649#discussion_r363142501
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -388,6 +388,23 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     return result;
 }
 
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
 
 Review comment:
   OK. I will update doc and fix this case.

----------------------------------------------------------------
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 #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649#discussion_r362785687
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -388,6 +388,23 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     return result;
 }
 
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
 
 Review comment:
   src and dst can be null, you should handle this case.
   

----------------------------------------------------------------
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] blueChild commented on a change in pull request #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
blueChild commented on a change in pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649#discussion_r363187836
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -388,6 +388,51 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     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:
   is the third parameter called ‘dst’ appropriate?

----------------------------------------------------------------
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 closed pull request #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
DanyBin closed pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649
 
 
   

----------------------------------------------------------------
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 #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649#discussion_r362786026
 
 

 ##########
 File path: be/test/exprs/bitmap_function_test.cpp
 ##########
 @@ -29,18 +29,16 @@
 namespace doris {
 
 StringVal convert_bitmap_to_string(FunctionContext* ctx, RoaringBitmap& bitmap) {
 
 Review comment:
   ```suggestion
   StringVal convert_bitmap_to_string(FunctionContext* ctx, const RoaringBitmap& 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 #2649: ADD BE UDF bitmap_and and bitmap_or

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #2649: ADD BE UDF bitmap_and  and bitmap_or
URL: https://github.com/apache/incubator-doris/pull/2649#discussion_r362785868
 
 

 ##########
 File path: be/src/exprs/bitmap_function.cpp
 ##########
 @@ -388,6 +388,23 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const
     return result;
 }
 
+StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){
+    RoaringBitmap src_bitmap ((char*)src.ptr);
 
 Review comment:
   src and dst can be already deserialized, you should handle the different cases.

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