[Enchancement](function) remove unused params on aggregate function (#16886)
remove unused params on aggregate function
This commit is contained in:
@ -28,46 +28,35 @@ namespace doris::vectorized {
|
||||
|
||||
AggregateFunctionPtr create_aggregate_function_dense_rank(const std::string& name,
|
||||
const DataTypes& argument_types,
|
||||
const Array& parameters,
|
||||
const bool result_is_nullable) {
|
||||
assert_no_parameters(name, parameters);
|
||||
|
||||
return std::make_shared<WindowFunctionDenseRank>(argument_types);
|
||||
}
|
||||
|
||||
AggregateFunctionPtr create_aggregate_function_rank(const std::string& name,
|
||||
const DataTypes& argument_types,
|
||||
const Array& parameters,
|
||||
const bool result_is_nullable) {
|
||||
assert_no_parameters(name, parameters);
|
||||
|
||||
return std::make_shared<WindowFunctionRank>(argument_types);
|
||||
}
|
||||
|
||||
AggregateFunctionPtr create_aggregate_function_row_number(const std::string& name,
|
||||
const DataTypes& argument_types,
|
||||
const Array& parameters,
|
||||
const bool result_is_nullable) {
|
||||
assert_no_parameters(name, parameters);
|
||||
|
||||
return std::make_shared<WindowFunctionRowNumber>(argument_types);
|
||||
}
|
||||
|
||||
AggregateFunctionPtr create_aggregate_function_ntile(const std::string& name,
|
||||
const DataTypes& argument_types,
|
||||
const Array& parameters,
|
||||
const bool result_is_nullable) {
|
||||
assert_unary(name, argument_types);
|
||||
|
||||
return std::make_shared<WindowFunctionNTile>(argument_types, parameters);
|
||||
return std::make_shared<WindowFunctionNTile>(argument_types);
|
||||
}
|
||||
|
||||
template <template <typename> class AggregateFunctionTemplate,
|
||||
template <typename ColVecType, bool, bool> class Data, template <typename> class Impl,
|
||||
bool result_is_nullable, bool arg_is_nullable>
|
||||
static IAggregateFunction* create_function_lead_lag_first_last(const String& name,
|
||||
const DataTypes& argument_types,
|
||||
const Array& parameters) {
|
||||
const DataTypes& argument_types) {
|
||||
auto type = remove_nullable(argument_types[0]);
|
||||
WhichDataType which(*type);
|
||||
|
||||
@ -85,9 +74,9 @@ static IAggregateFunction* create_function_lead_lag_first_last(const String& nam
|
||||
|
||||
#define CREATE_WINDOW_FUNCTION_WITH_NAME_AND_DATA(CREATE_FUNCTION_NAME, FUNCTION_DATA, \
|
||||
FUNCTION_IMPL) \
|
||||
AggregateFunctionPtr CREATE_FUNCTION_NAME( \
|
||||
const std::string& name, const DataTypes& argument_types, const Array& parameters, \
|
||||
const bool result_is_nullable) { \
|
||||
AggregateFunctionPtr CREATE_FUNCTION_NAME(const std::string& name, \
|
||||
const DataTypes& argument_types, \
|
||||
const bool result_is_nullable) { \
|
||||
const bool arg_is_nullable = argument_types[0]->is_nullable(); \
|
||||
AggregateFunctionPtr res = nullptr; \
|
||||
\
|
||||
@ -96,8 +85,8 @@ static IAggregateFunction* create_function_lead_lag_first_last(const String& nam
|
||||
res = AggregateFunctionPtr( \
|
||||
create_function_lead_lag_first_last<WindowFunctionData, FUNCTION_DATA, \
|
||||
FUNCTION_IMPL, result_is_nullable, \
|
||||
arg_is_nullable>( \
|
||||
name, argument_types, parameters)); \
|
||||
arg_is_nullable>(name, \
|
||||
argument_types)); \
|
||||
}, \
|
||||
make_bool_variant(result_is_nullable), make_bool_variant(arg_is_nullable)); \
|
||||
if (!res) { \
|
||||
|
||||
Reference in New Issue
Block a user