Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enchancement](function) Inline some aggregate function && remove nullable combinator #17328

Merged
merged 15 commits into from
Mar 9, 2023
Prev Previous commit
Next Next commit
update
  • Loading branch information
BiteTheDDDDt committed Mar 8, 2023
commit 9111625c0a437a348df032585364f33020b19425
19 changes: 13 additions & 6 deletions be/src/vec/aggregate_functions/aggregate_function_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ namespace doris::vectorized {
// auto spread at nullable condition, null value do not participate aggregate
void register_aggregate_function_reader_load(AggregateFunctionSimpleFactory& factory) {
// add a suffix to the function name here to distinguish special functions of agg reader
auto register_function = [&](const std::string& name, const AggregateFunctionCreator& creator) {
auto register_function = [&](const std::string& name, const AggregateFunctionCreator& creator,
bool is_nullable) {
factory.register_function(name + AGG_READER_SUFFIX, creator, is_nullable);
factory.register_function(name + AGG_LOAD_SUFFIX, creator, is_nullable);
};
auto register_function_both = [&](const std::string& name,
const AggregateFunctionCreator& creator) {
factory.register_function_both(name + AGG_READER_SUFFIX, creator);
factory.register_function_both(name + AGG_LOAD_SUFFIX, creator);
};

register_function("sum", create_aggregate_function_sum_reader);
register_function("max", create_aggregate_function_max);
register_function("min", create_aggregate_function_min);
register_function("bitmap_union", create_aggregate_function_bitmap_union);
register_function("hll_union", create_aggregate_function_HLL_union<false>);
register_function_both("sum", create_aggregate_function_sum_reader);
register_function_both("max", create_aggregate_function_max);
register_function_both("min", create_aggregate_function_min);
register_function_both("bitmap_union", create_aggregate_function_bitmap_union);
register_function("hll_union", create_aggregate_function_HLL_union<false>, false);
register_function("hll_union", create_aggregate_function_HLL_union<true>, true);
}

// only replace function in load/reader do different agg operation.
Expand Down