[Enchancement](function) Inline some aggregate function && remove nullable combinator (#17328)
1. Inline some aggregate function 2. remove nullable combinator
This commit is contained in:
@ -117,14 +117,8 @@ struct AggregateFunction {
|
||||
using Function = typename Derived::template TypeTraits<T>::Function;
|
||||
|
||||
static auto create(const DataTypePtr& data_type_ptr) -> AggregateFunctionPtr {
|
||||
DataTypes data_types = {remove_nullable(data_type_ptr)};
|
||||
AggregateFunctionPtr nested_function;
|
||||
nested_function.reset(creator_with_type::create<Function>(false, data_types));
|
||||
|
||||
AggregateFunctionPtr function;
|
||||
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
|
||||
{make_nullable(data_type_ptr)}));
|
||||
return function;
|
||||
return AggregateFunctionPtr(creator_with_type::create<Function>(
|
||||
true, DataTypes {make_nullable(data_type_ptr)}));
|
||||
}
|
||||
};
|
||||
|
||||
@ -229,14 +223,8 @@ struct NameArrayMin {
|
||||
template <>
|
||||
struct AggregateFunction<AggregateFunctionImpl<AggregateOperation::MIN>> {
|
||||
static auto create(const DataTypePtr& data_type_ptr) -> AggregateFunctionPtr {
|
||||
DataTypes data_types = {remove_nullable(data_type_ptr)};
|
||||
auto nested_function = AggregateFunctionPtr(
|
||||
create_aggregate_function_min(NameArrayMin::name, data_types, false));
|
||||
|
||||
AggregateFunctionPtr function;
|
||||
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
|
||||
{make_nullable(data_type_ptr)}));
|
||||
return function;
|
||||
return AggregateFunctionPtr(create_aggregate_function_min(
|
||||
NameArrayMin::name, {make_nullable(data_type_ptr)}, true));
|
||||
}
|
||||
};
|
||||
|
||||
@ -247,14 +235,8 @@ struct NameArrayMax {
|
||||
template <>
|
||||
struct AggregateFunction<AggregateFunctionImpl<AggregateOperation::MAX>> {
|
||||
static auto create(const DataTypePtr& data_type_ptr) -> AggregateFunctionPtr {
|
||||
DataTypes data_types = {remove_nullable(data_type_ptr)};
|
||||
auto nested_function = AggregateFunctionPtr(
|
||||
create_aggregate_function_max(NameArrayMax::name, data_types, false));
|
||||
|
||||
AggregateFunctionPtr function;
|
||||
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
|
||||
{make_nullable(data_type_ptr)}));
|
||||
return function;
|
||||
return AggregateFunctionPtr(create_aggregate_function_max(
|
||||
NameArrayMax::name, {make_nullable(data_type_ptr)}, true));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user