Skip to content

Commit 53788df

Browse files
wangboHappenLee
authored andcommitted
max/min support nullable column (apache#17)
1 parent 581bc03 commit 53788df

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎be/src/vec/aggregate_functions/aggregate_function_min_max.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ AggregateFunctionPtr createAggregateFunctionMin(const std::string & name, const
6464

6565
void registerAggregateFunctionMinMax(AggregateFunctionSimpleFactory& factory) {
6666
factory.registerFunction("max", createAggregateFunctionMax);
67-
factory.registerFunction("max", createAggregateFunctionMax, true);
6867
factory.registerFunction("min", createAggregateFunctionMin);
69-
factory.registerFunction("min", createAggregateFunctionMin, true);
7068
}
7169

7270
} // namespace doris::vectorized

‎be/src/vec/aggregate_functions/aggregate_function_null.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ void registerAggregateFunctionCombinatorNull(AggregateFunctionSimpleFactory& fac
102102
return function_combinator->transformAggregateFunction(nested_function, types, params);
103103
};
104104
factory.registerFunction("sum", creator, true);
105+
factory.registerFunction("max", creator, true);
106+
factory.registerFunction("min", creator, true);
105107
}
106108

107109
} // namespace doris::vectorized

‎be/src/vec/aggregate_functions/aggregate_function_simple_factory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class AggregateFunctionSimpleFactory {
8181
static AggregateFunctionSimpleFactory instance;
8282
std::call_once(oc, [&]() {
8383
registerAggregateFunctionSum(instance);
84-
registerAggregateFunctionCombinatorNull(instance);
8584
registerAggregateFunctionMinMax(instance);
85+
registerAggregateFunctionCombinatorNull(instance);
8686
});
8787
return instance;
8888
}

0 commit comments

Comments
 (0)