diff --git a/be/src/olap/memtable.cpp b/be/src/olap/memtable.cpp index 8c323fad95..d6137fe842 100644 --- a/be/src/olap/memtable.cpp +++ b/be/src/olap/memtable.cpp @@ -89,7 +89,7 @@ void MemTable::_init_agg_functions(const vectorized::Block* block) { // In such table, non-key column's aggregation type is NONE, so we need to construct // the aggregate function manually. function = vectorized::AggregateFunctionSimpleFactory::instance().get( - "replace_load", {block->get_data_type(cid)}, {}, + "replace_load", {block->get_data_type(cid)}, block->get_data_type(cid)->is_nullable()); } else { function = _tablet_schema->column(cid).get_aggregate_function( diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp index cabae8f9c4..99b85eba96 100644 --- a/be/src/olap/tablet_schema.cpp +++ b/be/src/olap/tablet_schema.cpp @@ -492,7 +492,7 @@ vectorized::AggregateFunctionPtr TabletColumn::get_aggregate_function( [](unsigned char c) { return std::tolower(c); }); return vectorized::AggregateFunctionSimpleFactory::instance().get( - agg_name, argument_types, {}, argument_types.back()->is_nullable()); + agg_name, argument_types, argument_types.back()->is_nullable()); } void TabletIndex::init_from_thrift(const TOlapTableIndex& index, diff --git a/be/src/vec/aggregate_functions/aggregate_function.h b/be/src/vec/aggregate_functions/aggregate_function.h index 43a726ec0e..d4a906231f 100644 --- a/be/src/vec/aggregate_functions/aggregate_function.h +++ b/be/src/vec/aggregate_functions/aggregate_function.h @@ -58,8 +58,7 @@ using ConstAggregateDataPtr = const char*; */ class IAggregateFunction { public: - IAggregateFunction(const DataTypes& argument_types_, const Array& parameters_) - : argument_types(argument_types_), parameters(parameters_) {} + IAggregateFunction(const DataTypes& argument_types_) : argument_types(argument_types_) {} /// Get main function name. virtual String get_name() const = 0; @@ -192,7 +191,6 @@ public: const size_t num_rows, Arena* arena) const = 0; const DataTypes& get_argument_types() const { return argument_types; } - const Array& get_parameters() const { return parameters; } virtual MutableColumnPtr create_serialize_column() const { return ColumnString::create(); } @@ -200,15 +198,14 @@ public: protected: DataTypes argument_types; - Array parameters; }; /// Implement method to obtain an address of 'add' function. template class IAggregateFunctionHelper : public IAggregateFunction { public: - IAggregateFunctionHelper(const DataTypes& argument_types_, const Array& parameters_) - : IAggregateFunction(argument_types_, parameters_) {} + IAggregateFunctionHelper(const DataTypes& argument_types_) + : IAggregateFunction(argument_types_) {} void destroy_vec(AggregateDataPtr __restrict place, const size_t num_rows) const noexcept override { @@ -381,8 +378,8 @@ protected: } public: - IAggregateFunctionDataHelper(const DataTypes& argument_types_, const Array& parameters_) - : IAggregateFunctionHelper(argument_types_, parameters_) {} + IAggregateFunctionDataHelper(const DataTypes& argument_types_) + : IAggregateFunctionHelper(argument_types_) {} void create(AggregateDataPtr __restrict place) const override { new (place) Data; } diff --git a/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.cpp b/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.cpp index d61c254a1e..0fa50b5194 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.cpp +++ b/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.cpp @@ -22,8 +22,7 @@ namespace doris::vectorized { AggregateFunctionPtr create_aggregate_function_approx_count_distinct( - const std::string& name, const DataTypes& argument_types, const Array& parameters, - const bool result_is_nullable) { + const std::string& name, const DataTypes& argument_types, const bool result_is_nullable) { AggregateFunctionPtr res = nullptr; WhichDataType which(argument_types[0]->is_nullable() ? reinterpret_cast(argument_types[0].get()) diff --git a/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.h b/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.h index 1c8c96efca..ae3ba2a0ea 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.h +++ b/be/src/vec/aggregate_functions/aggregate_function_approx_count_distinct.h @@ -72,7 +72,7 @@ public: AggregateFunctionApproxCountDistinct(const DataTypes& argument_types_) : IAggregateFunctionDataHelper>( - argument_types_, {}) {} + argument_types_) {} DataTypePtr get_return_type() const override { return std::make_shared(); } diff --git a/be/src/vec/aggregate_functions/aggregate_function_avg.cpp b/be/src/vec/aggregate_functions/aggregate_function_avg.cpp index 7f9295d8e7..19b5549582 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_avg.cpp +++ b/be/src/vec/aggregate_functions/aggregate_function_avg.cpp @@ -38,9 +38,7 @@ using AggregateFuncAvg = typename Avg::Function; AggregateFunctionPtr create_aggregate_function_avg(const std::string& name, const DataTypes& argument_types, - const Array& parameters, const bool result_is_nullable) { - assert_no_parameters(name, parameters); assert_unary(name, argument_types); AggregateFunctionPtr res; @@ -49,11 +47,10 @@ AggregateFunctionPtr create_aggregate_function_avg(const std::string& name, auto no_null_argument_types = remove_nullable(argument_types); if (is_decimal(no_null_argument_types[0])) { res.reset(create_with_decimal_type_null( - no_null_argument_types, parameters, *no_null_argument_types[0], - no_null_argument_types)); + no_null_argument_types, *no_null_argument_types[0], no_null_argument_types)); } else { - res.reset(create_with_numeric_type_null( - no_null_argument_types, parameters, no_null_argument_types)); + res.reset(create_with_numeric_type_null(no_null_argument_types, + no_null_argument_types)); } } else { if (is_decimal(data_type)) { diff --git a/be/src/vec/aggregate_functions/aggregate_function_avg.h b/be/src/vec/aggregate_functions/aggregate_function_avg.h index 783b115124..e74a38793f 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_avg.h +++ b/be/src/vec/aggregate_functions/aggregate_function_avg.h @@ -94,14 +94,12 @@ public: /// ctor for native types AggregateFunctionAvg(const DataTypes& argument_types_) - : IAggregateFunctionDataHelper>(argument_types_, - {}), + : IAggregateFunctionDataHelper>(argument_types_), scale(0) {} /// ctor for Decimals AggregateFunctionAvg(const IDataType& data_type, const DataTypes& argument_types_) - : IAggregateFunctionDataHelper>(argument_types_, - {}), + : IAggregateFunctionDataHelper>(argument_types_), scale(get_decimal_scale(data_type)) {} String get_name() const override { return "avg"; } diff --git a/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.cpp b/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.cpp index d5d85cf11e..ea4e058550 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.cpp +++ b/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.cpp @@ -24,7 +24,6 @@ namespace doris::vectorized { AggregateFunctionPtr create_aggregate_function_avg_weight(const std::string& name, const DataTypes& argument_types, - const Array& parameters, const bool result_is_nullable) { auto type = argument_types[0].get(); if (type->is_nullable()) { diff --git a/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.h b/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.h index c7cdb86a2c..aa3b70d4de 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.h +++ b/be/src/vec/aggregate_functions/aggregate_function_avg_weighted.h @@ -73,7 +73,7 @@ public: AggregateFunctionAvgWeight(const DataTypes& argument_types_) : IAggregateFunctionDataHelper, - AggregateFunctionAvgWeight>(argument_types_, {}) {} + AggregateFunctionAvgWeight>(argument_types_) {} String get_name() const override { return "avg_weighted"; } diff --git a/be/src/vec/aggregate_functions/aggregate_function_bit.cpp b/be/src/vec/aggregate_functions/aggregate_function_bit.cpp index 8bce17f456..afe7fde3a1 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_bit.cpp +++ b/be/src/vec/aggregate_functions/aggregate_function_bit.cpp @@ -27,7 +27,6 @@ namespace doris::vectorized { template