HappenLee commented on code in PR #55010:
URL: https://github.com/apache/doris/pull/55010#discussion_r2293065037
##########
be/src/vec/aggregate_functions/aggregate_function_bitmap.h:
##########
@@ -400,9 +401,20 @@ class AggregateFunctionBitmapCount final
void add_batch_single_place(size_t batch_size, AggregateDataPtr place,
const IColumn** columns,
Arena& arena) const override {
+ auto normal_add_lambda = [&]() {
+ for (size_t i = 0; i < batch_size; ++i) {
+ this->add(place, columns, i, arena);
+ }
+ };
+
// now this only for bitmap_union_count function
if constexpr (std::is_same_v<ColVecType, ColumnBitmap>) {
- auto lambda_function = [&](const IColumn& data_column, const
NullMap* null_map) {
+ // if batch_size is small, the add_batch of fast union seems to be
slower than normal add
+ if (batch_size < BATCH_HALF_ROWS) {
+ normal_add_lambda();
+ return;
+ }
+ auto add_batch_lambda = [&](const IColumn& data_column, const
NullMap* null_map) {
Review Comment:
move the `add_batch_lambda` in line 409 should be together with
`normal_add_lambda`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]