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_r311493980
##########
File path: be/src/olap/aggregate_func.h
##########
@@ -90,33 +86,98 @@ class AggregateInfo {
FieldAggregationMethod _agg_method;
};
+template<FieldType field_type>
struct BaseAggregateFuncs {
- // Default init function will set to null
- static void init(char* dst, Arena* arena) {
- *reinterpret_cast<bool*>(dst) = true;
+ static void init(RowCursorCell* dst, const char* src, bool src_null,
Arena* arena) {
+ dst->set_is_null(src_null);
+ if (src_null) {
+ return;
+ }
+
+ typedef typename FieldTypeTraits<field_type>::CppType CppType;
Review comment:
Can we use types. copy_with_arena to reuse some code, For example
AggregateFuncTraits<OLAP_FIELD_AGGREGATION_NONE, OLAP_FIELD_TYPE_VARCHAR>
----------------------------------------------------------------
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]