imay commented on a change in pull request #1599: Add bitmap Agg type and Udaf
URL: https://github.com/apache/incubator-doris/pull/1599#discussion_r311495099
 
 

 ##########
 File path: be/src/olap/aggregate_func.h
 ##########
 @@ -342,6 +418,48 @@ struct 
AggregateFuncTraits<OLAP_FIELD_AGGREGATION_HLL_UNION, OLAP_FIELD_TYPE_HLL
         delete context->hash64_set;
     }
 };
+// when data load, after bitmap_init fucntion, bitmap_union column won't be 
null
+// so when init, update, finalize bitmap, we needn't consider null
+template <>
+struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_BITMAP_UNION, 
OLAP_FIELD_TYPE_VARCHAR> {
+    static void init(RowCursorCell* dst, const char* src, bool src_null, 
Arena* arena) {
+        auto* src_slice = reinterpret_cast<const Slice*>(src);
+        auto* dst_slice = reinterpret_cast<Slice*>(dst->mutable_cell_ptr());
+
+        char* mem = arena->Allocate(sizeof(RoaringBitmap));
 
 Review comment:
   we can just new from heap to make things ease

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

Reply via email to