Skip to content

Commit

Permalink
max/min support nullable column (apache#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo authored and HappenLee committed Jul 1, 2021
1 parent 723059a commit 2d29502
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions be/src/vec/aggregate_functions/aggregate_function_min_max.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ AggregateFunctionPtr createAggregateFunctionMin(const std::string & name, const

void registerAggregateFunctionMinMax(AggregateFunctionSimpleFactory& factory) {
factory.registerFunction("max", createAggregateFunctionMax);
factory.registerFunction("max", createAggregateFunctionMax, true);
factory.registerFunction("min", createAggregateFunctionMin);
factory.registerFunction("min", createAggregateFunctionMin, true);
}

} // namespace doris::vectorized
2 changes: 2 additions & 0 deletions be/src/vec/aggregate_functions/aggregate_function_null.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void registerAggregateFunctionCombinatorNull(AggregateFunctionSimpleFactory& fac
return function_combinator->transformAggregateFunction(nested_function, types, params);
};
factory.registerFunction("sum", creator, true);
factory.registerFunction("max", creator, true);
factory.registerFunction("min", creator, true);
}

} // namespace doris::vectorized
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class AggregateFunctionSimpleFactory {
static AggregateFunctionSimpleFactory instance;
std::call_once(oc, [&]() {
registerAggregateFunctionSum(instance);
registerAggregateFunctionCombinatorNull(instance);
registerAggregateFunctionMinMax(instance);
registerAggregateFunctionCombinatorNull(instance);
});
return instance;
}
Expand Down

0 comments on commit 2d29502

Please sign in to comment.