zenoyang commented on code in PR #10084:
URL: https://github.com/apache/doris/pull/10084#discussion_r901839029
##########
be/src/vec/olap/block_reader.cpp:
##########
@@ -133,6 +133,29 @@ Status BlockReader::init(const ReaderParams& read_params) {
return status;
}
+ // only group by key num <= 3 and has bitmap_union col, enable block
aggregate
+ if (config::enable_block_aggregate_in_scanner && _aggregation &&
+ (_tablet->keys_type() == AGG_KEYS)) {
+ int agg_key_size = 0;
+ for (int i = 0; i < return_column_size; ++i) {
+ auto cid = read_params.origin_return_columns->at(i);
+ auto& col = _tablet->tablet_schema().column(cid);
+ if (col.is_key() && ++agg_key_size > 3) {
+ _block_aggregation = false;
+ break;
+ }
+ if (!col.is_key() &&
+ col.aggregation() ==
FieldAggregationMethod::OLAP_FIELD_AGGREGATION_BITMAP_UNION) {
Review Comment:
May be. Because the aggregated single-threaded throughput such as `sum` and
`count` is already very large, whether it is necessary to use multi-threading
requires more testing.
I'll provide more tests soon to decide if it's more general.
--
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]