This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2bc014d83a [Enchancement](function) remove unused params on aggregate
function (#16886)
2bc014d83a is described below
commit 2bc014d83aa05a91c681147adff533c0117f9645
Author: Pxl <[email protected]>
AuthorDate: Mon Feb 20 11:08:45 2023 +0800
[Enchancement](function) remove unused params on aggregate function (#16886)
remove unused params on aggregate function
---
be/src/olap/memtable.cpp | 2 +-
be/src/olap/tablet_schema.cpp | 2 +-
.../vec/aggregate_functions/aggregate_function.h | 13 +++----
.../aggregate_function_approx_count_distinct.cpp | 3 +-
.../aggregate_function_approx_count_distinct.h | 2 +-
.../aggregate_functions/aggregate_function_avg.cpp | 9 ++---
.../aggregate_functions/aggregate_function_avg.h | 6 +--
.../aggregate_function_avg_weighted.cpp | 1 -
.../aggregate_function_avg_weighted.h | 2 +-
.../aggregate_functions/aggregate_function_bit.cpp | 1 -
.../aggregate_functions/aggregate_function_bit.h | 4 +-
.../aggregate_function_bitmap.cpp | 5 ---
.../aggregate_function_bitmap.h | 6 +--
.../aggregate_function_collect.cpp | 1 -
.../aggregate_function_collect.h | 3 +-
.../aggregate_function_combinator.h | 8 +---
.../aggregate_function_count.cpp | 3 --
.../aggregate_functions/aggregate_function_count.h | 4 +-
.../aggregate_function_distinct.cpp | 9 +++--
.../aggregate_function_distinct.h | 3 +-
.../aggregate_function_group_concat.cpp | 1 -
.../aggregate_function_group_concat.h | 3 +-
.../aggregate_function_histogram.cpp | 1 -
.../aggregate_function_histogram.h | 2 +-
.../aggregate_function_hll_union_agg.cpp | 4 --
.../aggregate_function_hll_union_agg.h | 4 +-
.../aggregate_function_java_udaf.h | 8 ++--
.../aggregate_function_min_max.cpp | 16 ++------
.../aggregate_function_min_max.h | 6 +--
.../aggregate_function_min_max_by.cpp | 18 ++++-----
.../aggregate_function_min_max_by.h | 4 +-
.../aggregate_function_nothing.h | 4 +-
.../aggregate_function_null.cpp | 18 ++++-----
.../aggregate_functions/aggregate_function_null.h | 24 +++++-------
.../aggregate_function_orthogonal_bitmap.cpp | 27 ++++++-------
.../aggregate_function_orthogonal_bitmap.h | 3 +-
.../aggregate_function_percentile_approx.cpp | 7 ----
.../aggregate_function_percentile_approx.h | 7 ++--
.../aggregate_function_product.h | 4 +-
.../aggregate_function_reader_first_last.h | 45 ++++++++++------------
.../aggregate_function_retention.cpp | 1 -
.../aggregate_function_retention.h | 2 +-
.../aggregate_functions/aggregate_function_rpc.h | 10 ++---
.../aggregate_function_sequence_match.cpp | 1 -
.../aggregate_function_sequence_match.h | 2 +-
.../aggregate_function_simple_factory.cpp | 1 -
.../aggregate_function_simple_factory.h | 10 ++---
.../aggregate_functions/aggregate_function_sort.h | 3 +-
.../aggregate_function_stddev.cpp | 15 +++-----
.../aggregate_function_stddev.h | 2 +-
.../aggregate_functions/aggregate_function_sum.cpp | 13 +++----
.../aggregate_functions/aggregate_function_sum.h | 5 +--
.../aggregate_function_topn.cpp | 3 --
.../aggregate_functions/aggregate_function_topn.h | 3 +-
.../aggregate_function_uniq.cpp | 3 --
.../aggregate_functions/aggregate_function_uniq.h | 3 +-
.../aggregate_function_window.cpp | 25 ++++--------
.../aggregate_function_window.h | 12 +++---
.../aggregate_function_window_funnel.cpp | 1 -
.../aggregate_function_window_funnel.h | 3 +-
be/src/vec/aggregate_functions/factory_helpers.h | 4 --
be/src/vec/aggregate_functions/helpers.h | 24 ++++++------
be/src/vec/exprs/vectorized_agg_fn.cpp | 6 +--
.../functions/array/function_array_aggregation.cpp | 10 ++---
.../vec/aggregate_functions/agg_collect_test.cpp | 3 +-
.../vec/aggregate_functions/agg_histogram_test.cpp | 3 +-
.../aggregate_functions/agg_min_max_by_test.cpp | 3 +-
.../vec/aggregate_functions/agg_min_max_test.cpp | 9 ++---
be/test/vec/aggregate_functions/agg_test.cpp | 6 +--
.../vec/aggregate_functions/vec_retention_test.cpp | 3 +-
.../vec_sequence_match_test.cpp | 14 +++----
.../aggregate_functions/vec_window_funnel_test.cpp | 3 +-
72 files changed, 185 insertions(+), 314 deletions(-)
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 <typename Derived>
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<Derived>(argument_types_, parameters_)
{}
+ IAggregateFunctionDataHelper(const DataTypes& argument_types_)
+ : IAggregateFunctionHelper<Derived>(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<const
DataTypeNullable*>(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<AggregateFunctionApproxCountDistinctData,
AggregateFunctionApproxCountDistinct<ColumnDataType>>(
- argument_types_, {}) {}
+ argument_types_) {}
DataTypePtr get_return_type() const override { return
std::make_shared<DataTypeInt64>(); }
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<T>::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<AggregateFuncAvg>(
- 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<AggregateFuncAvg>(
- no_null_argument_types, parameters,
no_null_argument_types));
+
res.reset(create_with_numeric_type_null<AggregateFuncAvg>(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<Data, AggregateFunctionAvg<T,
Data>>(argument_types_,
-
{}),
+ : IAggregateFunctionDataHelper<Data, AggregateFunctionAvg<T,
Data>>(argument_types_),
scale(0) {}
/// ctor for Decimals
AggregateFunctionAvg(const IDataType& data_type, const DataTypes&
argument_types_)
- : IAggregateFunctionDataHelper<Data, AggregateFunctionAvg<T,
Data>>(argument_types_,
-
{}),
+ : IAggregateFunctionDataHelper<Data, AggregateFunctionAvg<T,
Data>>(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<AggregateFunctionAvgWeightedData<T>,
-
AggregateFunctionAvgWeight<T>>(argument_types_, {}) {}
+
AggregateFunctionAvgWeight<T>>(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 <template <typename> class Data>
AggregateFunctionPtr createAggregateFunctionBitwise(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
if (!argument_types[0]->can_be_used_in_bit_operations()) {
LOG(WARNING) << fmt::format("The type " +
argument_types[0]->get_name() +
diff --git a/be/src/vec/aggregate_functions/aggregate_function_bit.h
b/be/src/vec/aggregate_functions/aggregate_function_bit.h
index e7f2456259..0714ca6f34 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_bit.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_bit.h
@@ -91,8 +91,8 @@ class AggregateFunctionBitwise final
: public IAggregateFunctionDataHelper<Data,
AggregateFunctionBitwise<T, Data>> {
public:
AggregateFunctionBitwise(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper<Data, AggregateFunctionBitwise<T,
Data>>(argument_types_,
-
{}) {}
+ : IAggregateFunctionDataHelper<Data, AggregateFunctionBitwise<T,
Data>>(
+ argument_types_) {}
String get_name() const override { return Data::name; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_bitmap.cpp
b/be/src/vec/aggregate_functions/aggregate_function_bitmap.cpp
index fe52a1bdfb..eb9a8fb35c 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_bitmap.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_bitmap.cpp
@@ -45,7 +45,6 @@ static IAggregateFunction* createWithIntDataType(const
DataTypes& argument_type)
AggregateFunctionPtr create_aggregate_function_bitmap_union(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return
std::make_shared<AggregateFunctionBitmapOp<AggregateFunctionBitmapUnionOp>>(
argument_types);
@@ -53,7 +52,6 @@ AggregateFunctionPtr
create_aggregate_function_bitmap_union(const std::string& n
AggregateFunctionPtr create_aggregate_function_bitmap_intersect(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return
std::make_shared<AggregateFunctionBitmapOp<AggregateFunctionBitmapIntersectOp>>(
argument_types);
@@ -61,7 +59,6 @@ AggregateFunctionPtr
create_aggregate_function_bitmap_intersect(const std::strin
AggregateFunctionPtr create_aggregate_function_group_bitmap_xor(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return
std::make_shared<AggregateFunctionBitmapOp<AggregateFunctionGroupBitmapXorOp>>(
argument_types);
@@ -69,7 +66,6 @@ AggregateFunctionPtr
create_aggregate_function_group_bitmap_xor(const std::strin
AggregateFunctionPtr create_aggregate_function_bitmap_union_count(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
const bool arg_is_nullable = argument_types[0]->is_nullable();
if (arg_is_nullable) {
@@ -81,7 +77,6 @@ AggregateFunctionPtr
create_aggregate_function_bitmap_union_count(const std::str
AggregateFunctionPtr create_aggregate_function_bitmap_union_int(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
const bool arg_is_nullable = argument_types[0]->is_nullable();
if (arg_is_nullable) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_bitmap.h
b/be/src/vec/aggregate_functions/aggregate_function_bitmap.h
index aabc6efb62..c7c537d2e3 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_bitmap.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_bitmap.h
@@ -142,7 +142,7 @@ public:
AggregateFunctionBitmapOp(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<AggregateFunctionBitmapData<Op>,
-
AggregateFunctionBitmapOp<Op>>(argument_types_, {}) {}
+
AggregateFunctionBitmapOp<Op>>(argument_types_) {}
DataTypePtr get_return_type() const override { return
std::make_shared<DataTypeBitMap>(); }
@@ -201,8 +201,7 @@ public:
AggregateFunctionBitmapCount(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<
AggregateFunctionBitmapData<AggregateFunctionBitmapUnionOp>,
- AggregateFunctionBitmapCount<arg_is_nullable,
ColVecType>>(argument_types_,
-
{}) {}
+ AggregateFunctionBitmapCount<arg_is_nullable,
ColVecType>>(argument_types_) {}
String get_name() const override { return "count"; }
DataTypePtr get_return_type() const override { return
std::make_shared<DataTypeInt64>(); }
@@ -270,7 +269,6 @@ public:
AggregateFunctionPtr create_aggregate_function_bitmap_union(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable);
} // namespace doris::vectorized
\ No newline at end of file
diff --git a/be/src/vec/aggregate_functions/aggregate_function_collect.cpp
b/be/src/vec/aggregate_functions/aggregate_function_collect.cpp
index c1937cc06e..577b8e1c23 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_collect.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_collect.cpp
@@ -34,7 +34,6 @@ AggregateFunctionPtr create_agg_function_collect(bool
distinct, const DataTypes&
AggregateFunctionPtr create_aggregate_function_collect(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
if (argument_types.size() != 1) {
LOG(WARNING) << fmt::format("Illegal number {} of argument for
aggregate function {}",
diff --git a/be/src/vec/aggregate_functions/aggregate_function_collect.h
b/be/src/vec/aggregate_functions/aggregate_function_collect.h
index 78e7c3bec6..f194fc2639 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_collect.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_collect.h
@@ -189,8 +189,7 @@ public:
std::is_same_v<Data, AggregateFunctionCollectSetData<StringRef>>;
AggregateFunctionCollect(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper<Data,
AggregateFunctionCollect<Data>>(argument_types_,
-
{}),
+ : IAggregateFunctionDataHelper<Data,
AggregateFunctionCollect<Data>>(argument_types_),
_argument_type(argument_types_[0]) {}
std::string get_name() const override {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_combinator.h
b/be/src/vec/aggregate_functions/aggregate_function_combinator.h
index a5aed5530b..cc62e38aea 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_combinator.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_combinator.h
@@ -58,12 +58,6 @@ public:
*/
virtual DataTypes transform_arguments(const DataTypes& arguments) const {
return arguments; }
- /** From the parameters for combined function,
- * get the parameters for nested function.
- * If arguments are not suitable for combined function, throw an
exception.
- */
- virtual Array transform_parameters(const Array& parameters) const { return
parameters; }
-
/** Create combined aggregate function (ex: sumIf)
* from nested function (ex: sum)
* and arguments for combined aggregate function (ex: UInt64, UInt8 for
sumIf).
@@ -71,7 +65,7 @@ public:
*/
virtual AggregateFunctionPtr transform_aggregate_function(
const AggregateFunctionPtr& nested_function, const DataTypes&
arguments,
- const Array& params, const bool result_is_nullable) const = 0;
+ const bool result_is_nullable) const = 0;
virtual ~IAggregateFunctionCombinator() = default;
};
diff --git a/be/src/vec/aggregate_functions/aggregate_function_count.cpp
b/be/src/vec/aggregate_functions/aggregate_function_count.cpp
index aa5d0061eb..2fe3692d9e 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_count.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_count.cpp
@@ -27,9 +27,7 @@ namespace doris::vectorized {
AggregateFunctionPtr create_aggregate_function_count(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
- assert_no_parameters(name, parameters);
assert_arity_at_most<1>(name, argument_types);
return std::make_shared<AggregateFunctionCount>(argument_types);
@@ -37,7 +35,6 @@ AggregateFunctionPtr create_aggregate_function_count(const
std::string& name,
AggregateFunctionPtr create_aggregate_function_count_not_null_unary(const
std::string& name,
const
DataTypes& argument_types,
- const
Array& parameters,
const bool
result_is_nullable) {
assert_arity_at_most<1>(name, argument_types);
diff --git a/be/src/vec/aggregate_functions/aggregate_function_count.h
b/be/src/vec/aggregate_functions/aggregate_function_count.h
index bc87e4bb10..63808ac107 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_count.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_count.h
@@ -40,7 +40,7 @@ class AggregateFunctionCount final
: public IAggregateFunctionDataHelper<AggregateFunctionCountData,
AggregateFunctionCount> {
public:
AggregateFunctionCount(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper(argument_types_, {}) {}
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "count"; }
@@ -128,7 +128,7 @@ class AggregateFunctionCountNotNullUnary final
AggregateFunctionCountNotNullUnary> {
public:
AggregateFunctionCountNotNullUnary(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper(argument_types_, {}) {}
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "count"; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_distinct.cpp
b/be/src/vec/aggregate_functions/aggregate_function_distinct.cpp
index eb54d8070c..218c11e73b 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_distinct.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_distinct.cpp
@@ -24,6 +24,7 @@
#include "vec/aggregate_functions/aggregate_function_simple_factory.h"
#include "vec/aggregate_functions/helpers.h"
#include "vec/common/typeid_cast.h"
+#include "vec/data_types/data_type.h"
#include "vec/data_types/data_type_nullable.h"
namespace doris::vectorized {
@@ -42,7 +43,7 @@ public:
AggregateFunctionPtr transform_aggregate_function(
const AggregateFunctionPtr& nested_function, const DataTypes&
arguments,
- const Array& params, const bool result_is_nullable) const override
{
+ const bool result_is_nullable) const override {
DCHECK(nested_function != nullptr);
if (nested_function == nullptr) {
return nullptr;
@@ -79,7 +80,7 @@ const std::string DISTINCT_FUNCTION_PREFIX =
"multi_distinct_";
void
register_aggregate_function_combinator_distinct(AggregateFunctionSimpleFactory&
factory) {
AggregateFunctionCreator creator = [&](const std::string& name, const
DataTypes& types,
- const Array& params, const bool
result_is_nullable) {
+ const bool result_is_nullable) {
// 1. we should get not nullable types;
DataTypes nested_types(types.size());
std::transform(types.begin(), types.end(), nested_types.begin(),
@@ -87,8 +88,8 @@ void
register_aggregate_function_combinator_distinct(AggregateFunctionSimpleFact
auto function_combinator =
std::make_shared<AggregateFunctionCombinatorDistinct>();
auto transform_arguments =
function_combinator->transform_arguments(nested_types);
auto nested_function_name =
name.substr(DISTINCT_FUNCTION_PREFIX.size());
- auto nested_function = factory.get(nested_function_name,
transform_arguments, params);
- return
function_combinator->transform_aggregate_function(nested_function, types,
params,
+ auto nested_function = factory.get(nested_function_name,
transform_arguments);
+ return
function_combinator->transform_aggregate_function(nested_function, types,
result_is_nullable);
};
factory.register_distinct_function_combinator(creator,
DISTINCT_FUNCTION_PREFIX);
diff --git a/be/src/vec/aggregate_functions/aggregate_function_distinct.h
b/be/src/vec/aggregate_functions/aggregate_function_distinct.h
index 801924d53d..3961e32447 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_distinct.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_distinct.h
@@ -168,8 +168,7 @@ private:
public:
AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const
DataTypes& arguments)
- : IAggregateFunctionDataHelper<Data, AggregateFunctionDistinct>(
- arguments, nested_func_->get_parameters()),
+ : IAggregateFunctionDataHelper<Data,
AggregateFunctionDistinct>(arguments),
nested_func(nested_func_),
arguments_num(arguments.size()) {
size_t nested_size = nested_func->align_of_data();
diff --git a/be/src/vec/aggregate_functions/aggregate_function_group_concat.cpp
b/be/src/vec/aggregate_functions/aggregate_function_group_concat.cpp
index 1796a9561e..bcd7becc5e 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_group_concat.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_group_concat.cpp
@@ -23,7 +23,6 @@ const std::string
AggregateFunctionGroupConcatImplStr::separator = ", ";
AggregateFunctionPtr create_aggregate_function_group_concat(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
if (argument_types.size() == 1) {
return AggregateFunctionPtr(
diff --git a/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
b/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
index 33c83fc7b0..c4316fb2c7 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
@@ -103,8 +103,7 @@ class AggregateFunctionGroupConcat final
public:
AggregateFunctionGroupConcat(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<AggregateFunctionGroupConcatData,
-
AggregateFunctionGroupConcat<Impl>>(argument_types_,
-
{}) {}
+
AggregateFunctionGroupConcat<Impl>>(argument_types_) {}
String get_name() const override { return "group_concat"; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_histogram.cpp
b/be/src/vec/aggregate_functions/aggregate_function_histogram.cpp
index 983526a582..81dece0c95 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_histogram.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_histogram.cpp
@@ -39,7 +39,6 @@ AggregateFunctionPtr create_agg_function_histogram(const
DataTypes& argument_typ
AggregateFunctionPtr create_aggregate_function_histogram(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
WhichDataType type(argument_types[0]);
diff --git a/be/src/vec/aggregate_functions/aggregate_function_histogram.h
b/be/src/vec/aggregate_functions/aggregate_function_histogram.h
index 5f036a398d..6f23e1bc81 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_histogram.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_histogram.h
@@ -151,7 +151,7 @@ public:
AggregateFunctionHistogram(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<Data,
AggregateFunctionHistogram<Data, T,
has_input_param>>(
- argument_types_, {}),
+ argument_types_),
_argument_type(argument_types_[0]) {}
std::string get_name() const override { return "histogram"; }
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.cpp
b/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.cpp
index 1d9219c704..8ca12d4e14 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.cpp
@@ -25,9 +25,7 @@ namespace doris::vectorized {
template <bool is_nullable>
AggregateFunctionPtr create_aggregate_function_HLL_union_agg(const
std::string& name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
- assert_no_parameters(name, parameters);
assert_arity_at_most<1>(name, argument_types);
return std::make_shared<AggregateFunctionHLLUnion<
@@ -38,9 +36,7 @@ AggregateFunctionPtr
create_aggregate_function_HLL_union_agg(const std::string&
template <bool is_nullable>
AggregateFunctionPtr create_aggregate_function_HLL_union(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
- assert_no_parameters(name, parameters);
assert_arity_at_most<1>(name, argument_types);
return std::make_shared<AggregateFunctionHLLUnion<
diff --git a/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.h
b/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.h
index 5f76abd261..9052d78027 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_hll_union_agg.h
@@ -98,8 +98,7 @@ class AggregateFunctionHLLUnion
: public IAggregateFunctionDataHelper<Data,
AggregateFunctionHLLUnion<Data>> {
public:
AggregateFunctionHLLUnion(const DataTypes& argument_types)
- : IAggregateFunctionDataHelper<Data,
AggregateFunctionHLLUnion<Data>>(argument_types,
-
{}) {}
+ : IAggregateFunctionDataHelper<Data,
AggregateFunctionHLLUnion<Data>>(argument_types) {}
String get_name() const override { return Data::name(); }
@@ -134,7 +133,6 @@ public:
template <bool is_nullable = false>
AggregateFunctionPtr create_aggregate_function_HLL_union(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable);
} // namespace doris::vectorized
diff --git a/be/src/vec/aggregate_functions/aggregate_function_java_udaf.h
b/be/src/vec/aggregate_functions/aggregate_function_java_udaf.h
index 1abf2d5208..6b8b1ce9a1 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_java_udaf.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_java_udaf.h
@@ -299,9 +299,9 @@ private:
class AggregateJavaUdaf final
: public IAggregateFunctionDataHelper<AggregateJavaUdafData,
AggregateJavaUdaf> {
public:
- AggregateJavaUdaf(const TFunction& fn, const DataTypes& argument_types,
const Array& parameters,
+ AggregateJavaUdaf(const TFunction& fn, const DataTypes& argument_types,
const DataTypePtr& return_type)
- : IAggregateFunctionDataHelper(argument_types, parameters),
+ : IAggregateFunctionDataHelper(argument_types),
_fn(fn),
_return_type(return_type),
_first_created(true),
@@ -309,8 +309,8 @@ public:
~AggregateJavaUdaf() = default;
static AggregateFunctionPtr create(const TFunction& fn, const DataTypes&
argument_types,
- const Array& parameters, const
DataTypePtr& return_type) {
- return std::make_shared<AggregateJavaUdaf>(fn, argument_types,
parameters, return_type);
+ const DataTypePtr& return_type) {
+ return std::make_shared<AggregateJavaUdaf>(fn, argument_types,
return_type);
}
//Note: The condition is added because maybe the BE can't find java-udaf
impl jar
//So need to check as soon as possible, before call Data function
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max.cpp
b/be/src/vec/aggregate_functions/aggregate_function_min_max.cpp
index a01e2ce51a..075aa1e943 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max.cpp
@@ -28,9 +28,7 @@ namespace doris::vectorized {
/// min, max, any
template <template <typename, bool> class AggregateFunctionTemplate, template
<typename> class Data>
static IAggregateFunction* create_aggregate_function_single_value(const
String& name,
- const
DataTypes& argument_types,
- const Array&
parameters) {
- assert_no_parameters(name, parameters);
+ const
DataTypes& argument_types) {
assert_unary(name, argument_types);
const DataTypePtr& argument_type = argument_types[0];
@@ -78,32 +76,26 @@ static IAggregateFunction*
create_aggregate_function_single_value(const String&
AggregateFunctionPtr create_aggregate_function_max(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_aggregate_function_single_value<AggregateFunctionsSingleValue,
-
AggregateFunctionMaxData>(name, argument_types,
-
parameters));
+
AggregateFunctionMaxData>(name, argument_types));
}
AggregateFunctionPtr create_aggregate_function_min(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_aggregate_function_single_value<AggregateFunctionsSingleValue,
-
AggregateFunctionMinData>(name, argument_types,
-
parameters));
+
AggregateFunctionMinData>(name, argument_types));
}
AggregateFunctionPtr create_aggregate_function_any(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_aggregate_function_single_value<AggregateFunctionsSingleValue,
-
AggregateFunctionAnyData>(name, argument_types,
-
parameters));
+
AggregateFunctionAnyData>(name, argument_types));
}
void register_aggregate_function_minmax(AggregateFunctionSimpleFactory&
factory) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max.h
b/be/src/vec/aggregate_functions/aggregate_function_min_max.h
index 5bb86dd271..66e5458c09 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max.h
@@ -497,8 +497,7 @@ private:
public:
AggregateFunctionsSingleValue(const DataTypePtr& type_)
: IAggregateFunctionDataHelper<
- Data, AggregateFunctionsSingleValue<Data,
AllocatesMemoryInArena>>({type_},
-
{}),
+ Data, AggregateFunctionsSingleValue<Data,
AllocatesMemoryInArena>>({type_}),
type(this->argument_types[0]) {
if (StringRef(Data::name()) == StringRef("min") ||
StringRef(Data::name()) == StringRef("max")) {
@@ -628,17 +627,14 @@ public:
AggregateFunctionPtr create_aggregate_function_max(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable);
AggregateFunctionPtr create_aggregate_function_min(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable);
AggregateFunctionPtr create_aggregate_function_any(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable);
} // namespace doris::vectorized
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
index fbcfcb5ddf..8a4ad945f9 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
@@ -75,9 +75,7 @@ static IAggregateFunction*
create_aggregate_function_min_max_by_impl(
template <template <typename, bool> class AggregateFunctionTemplate,
template <typename, typename> class Data>
static IAggregateFunction* create_aggregate_function_min_max_by(const String&
name,
- const
DataTypes& argument_types,
- const Array&
parameters) {
- assert_no_parameters(name, parameters);
+ const
DataTypes& argument_types) {
assert_binary(name, argument_types);
const DataTypePtr& value_arg_type = argument_types[0];
@@ -129,20 +127,18 @@ static IAggregateFunction*
create_aggregate_function_min_max_by(const String& na
AggregateFunctionPtr create_aggregate_function_max_by(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
- return
AggregateFunctionPtr(create_aggregate_function_min_max_by<AggregateFunctionsMinMaxBy,
-
AggregateFunctionMaxByData>(
- name, argument_types, parameters));
+ return AggregateFunctionPtr(
+ create_aggregate_function_min_max_by<AggregateFunctionsMinMaxBy,
+
AggregateFunctionMaxByData>(name, argument_types));
}
AggregateFunctionPtr create_aggregate_function_min_by(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
- return
AggregateFunctionPtr(create_aggregate_function_min_max_by<AggregateFunctionsMinMaxBy,
-
AggregateFunctionMinByData>(
- name, argument_types, parameters));
+ return AggregateFunctionPtr(
+ create_aggregate_function_min_max_by<AggregateFunctionsMinMaxBy,
+
AggregateFunctionMinByData>(name, argument_types));
}
void register_aggregate_function_min_max_by(AggregateFunctionSimpleFactory&
factory) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
index 5fb061c3e9..b25e771862 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
@@ -107,7 +107,7 @@ public:
AggregateFunctionsMinMaxBy(const DataTypePtr& value_type_, const
DataTypePtr& key_type_)
: IAggregateFunctionDataHelper<
Data, AggregateFunctionsMinMaxBy<Data,
AllocatesMemoryInArena>>(
- {value_type_, key_type_}, {}),
+ {value_type_, key_type_}),
value_type(this->argument_types[0]),
key_type(this->argument_types[1]) {
if (StringRef(Data::name()) == StringRef("min_by") ||
@@ -150,12 +150,10 @@ public:
AggregateFunctionPtr create_aggregate_function_max_by(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable);
AggregateFunctionPtr create_aggregate_function_min_by(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable);
} // namespace doris::vectorized
diff --git a/be/src/vec/aggregate_functions/aggregate_function_nothing.h
b/be/src/vec/aggregate_functions/aggregate_function_nothing.h
index c6b310a9a5..f8f3cda43c 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_nothing.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_nothing.h
@@ -32,8 +32,8 @@ namespace doris::vectorized {
*/
class AggregateFunctionNothing final : public
IAggregateFunctionHelper<AggregateFunctionNothing> {
public:
- AggregateFunctionNothing(const DataTypes& arguments, const Array& params)
- : IAggregateFunctionHelper<AggregateFunctionNothing>(arguments,
params) {}
+ AggregateFunctionNothing(const DataTypes& arguments)
+ : IAggregateFunctionHelper<AggregateFunctionNothing>(arguments) {}
String get_name() const override { return "nothing"; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_null.cpp
b/be/src/vec/aggregate_functions/aggregate_function_null.cpp
index 8ae2368864..6795adecf9 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_null.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_null.cpp
@@ -47,7 +47,7 @@ public:
AggregateFunctionPtr transform_aggregate_function(
const AggregateFunctionPtr& nested_function, const DataTypes&
arguments,
- const Array& params, const bool result_is_nullable) const override
{
+ const bool result_is_nullable) const override {
if (nested_function == nullptr) {
return nullptr;
}
@@ -61,24 +61,24 @@ public:
}
if (has_null_types) {
- return std::make_shared<AggregateFunctionNothing>(arguments,
params);
+ return std::make_shared<AggregateFunctionNothing>(arguments);
}
if (arguments.size() == 1) {
if (result_is_nullable) {
return
std::make_shared<AggregateFunctionNullUnary<true>>(nested_function,
-
arguments, params);
+
arguments);
} else {
return
std::make_shared<AggregateFunctionNullUnary<false>>(nested_function,
-
arguments, params);
+
arguments);
}
} else {
if (result_is_nullable) {
return
std::make_shared<AggregateFunctionNullVariadic<true>>(nested_function,
-
arguments, params);
+
arguments);
} else {
return
std::make_shared<AggregateFunctionNullVariadic<false>>(nested_function,
-
arguments, params);
+
arguments);
}
}
}
@@ -86,11 +86,11 @@ public:
void
register_aggregate_function_combinator_null(AggregateFunctionSimpleFactory&
factory) {
AggregateFunctionCreator creator = [&](const std::string& name, const
DataTypes& types,
- const Array& params, const bool
result_is_nullable) {
+ const bool result_is_nullable) {
auto function_combinator =
std::make_shared<AggregateFunctionCombinatorNull>();
auto transform_arguments =
function_combinator->transform_arguments(types);
- auto nested_function = factory.get(name, transform_arguments, params);
- return
function_combinator->transform_aggregate_function(nested_function, types,
params,
+ auto nested_function = factory.get(name, transform_arguments);
+ return
function_combinator->transform_aggregate_function(nested_function, types,
result_is_nullable);
};
factory.register_nullable_function_combinator(creator);
diff --git a/be/src/vec/aggregate_functions/aggregate_function_null.h
b/be/src/vec/aggregate_functions/aggregate_function_null.h
index 69642d0deb..87ffde1c14 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_null.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_null.h
@@ -79,10 +79,8 @@ protected:
}
public:
- AggregateFunctionNullBase(AggregateFunctionPtr nested_function_, const
DataTypes& arguments,
- const Array& params)
- : IAggregateFunctionHelper<Derived>(arguments, params),
- nested_function {nested_function_} {
+ AggregateFunctionNullBase(AggregateFunctionPtr nested_function_, const
DataTypes& arguments)
+ : IAggregateFunctionHelper<Derived>(arguments), nested_function
{nested_function_} {
if (result_is_nullable) {
prefix_size = nested_function->align_of_data();
} else {
@@ -204,11 +202,10 @@ class AggregateFunctionNullUnary final
: public AggregateFunctionNullBase<result_is_nullable,
AggregateFunctionNullUnary<result_is_nullable>> {
public:
- AggregateFunctionNullUnary(AggregateFunctionPtr nested_function_, const
DataTypes& arguments,
- const Array& params)
+ AggregateFunctionNullUnary(AggregateFunctionPtr nested_function_, const
DataTypes& arguments)
: AggregateFunctionNullBase<result_is_nullable,
AggregateFunctionNullUnary<result_is_nullable>>(
- std::move(nested_function_), arguments, params) {}
+ std::move(nested_function_), arguments) {}
void add(AggregateDataPtr __restrict place, const IColumn** columns,
size_t row_num,
Arena* arena) const override {
@@ -351,11 +348,10 @@ class AggregateFunctionNullVariadic final
: public AggregateFunctionNullBase<result_is_nullable,
AggregateFunctionNullVariadic<result_is_nullable>> {
public:
- AggregateFunctionNullVariadic(AggregateFunctionPtr nested_function_, const
DataTypes& arguments,
- const Array& params)
+ AggregateFunctionNullVariadic(AggregateFunctionPtr nested_function_, const
DataTypes& arguments)
: AggregateFunctionNullBase<result_is_nullable,
AggregateFunctionNullVariadic<result_is_nullable>>(
- std::move(nested_function_), arguments, params),
+ std::move(nested_function_), arguments),
number_of_arguments(arguments.size()) {
if (number_of_arguments == 1) {
LOG(FATAL)
@@ -449,8 +445,8 @@ protected:
public:
AggregateFunctionNullBaseInline(IAggregateFunction* nested_function_,
- const DataTypes& arguments, const Array&
params)
- : IAggregateFunctionHelper<Derived>(arguments, params),
+ const DataTypes& arguments)
+ : IAggregateFunctionHelper<Derived>(arguments),
nested_function {assert_cast<NestFunction*>(nested_function_)} {
if (result_is_nullable) {
prefix_size = nested_function->align_of_data();
@@ -575,11 +571,11 @@ class AggregateFunctionNullUnaryInline final
AggregateFunctionNullUnaryInline<NestFuction,
result_is_nullable>> {
public:
AggregateFunctionNullUnaryInline(IAggregateFunction* nested_function_,
- const DataTypes& arguments, const Array&
params)
+ const DataTypes& arguments)
: AggregateFunctionNullBaseInline<
NestFuction, result_is_nullable,
AggregateFunctionNullUnaryInline<NestFuction,
result_is_nullable>>(
- nested_function_, arguments, params) {}
+ nested_function_, arguments) {}
void add(AggregateDataPtr __restrict place, const IColumn** columns,
size_t row_num,
Arena* arena) const override {
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
index 59aeec80f4..8d62810b6b 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
@@ -28,7 +28,7 @@ namespace doris::vectorized {
template <template <typename> class Impl>
AggregateFunctionPtr create_aggregate_function_orthogonal(const std::string&
name,
const DataTypes&
argument_types,
- const Array& params,
+
const bool
result_is_nullable) {
if (argument_types.empty()) {
LOG(WARNING) << "Incorrect number of arguments for aggregate function
" << name;
@@ -55,32 +55,29 @@ AggregateFunctionPtr
create_aggregate_function_orthogonal(const std::string& nam
}
AggregateFunctionPtr create_aggregate_function_orthogonal_bitmap_intersect(
- const std::string& name, const DataTypes& argument_types, const Array&
parameters,
- bool result_is_nullable) {
- return create_aggregate_function_orthogonal<AggOrthBitMapIntersect>(
- name, argument_types, parameters, result_is_nullable);
+ const std::string& name, const DataTypes& argument_types, bool
result_is_nullable) {
+ return create_aggregate_function_orthogonal<AggOrthBitMapIntersect>(name,
argument_types,
+
result_is_nullable);
}
AggregateFunctionPtr
create_aggregate_function_orthogonal_bitmap_intersect_count(
- const std::string& name, const DataTypes& argument_types, const Array&
parameters,
- bool result_is_nullable) {
- return create_aggregate_function_orthogonal<AggOrthBitMapIntersectCount>(
- name, argument_types, parameters, result_is_nullable);
+ const std::string& name, const DataTypes& argument_types, bool
result_is_nullable) {
+ return
create_aggregate_function_orthogonal<AggOrthBitMapIntersectCount>(name,
argument_types,
+
result_is_nullable);
}
AggregateFunctionPtr create_aggregate_function_intersect_count(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
+
bool
result_is_nullable) {
- return create_aggregate_function_orthogonal<AggIntersectCount>(name,
argument_types, parameters,
+ return create_aggregate_function_orthogonal<AggIntersectCount>(name,
argument_types,
result_is_nullable);
}
AggregateFunctionPtr create_aggregate_function_orthogonal_bitmap_union_count(
- const std::string& name, const DataTypes& argument_types, const Array&
parameters,
- const bool result_is_nullable) {
- return create_aggregate_function_orthogonal<OrthBitmapUnionCountData>(
- name, argument_types, parameters, result_is_nullable);
+ const std::string& name, const DataTypes& argument_types, const bool
result_is_nullable) {
+ return
create_aggregate_function_orthogonal<OrthBitmapUnionCountData>(name,
argument_types,
+
result_is_nullable);
}
void
register_aggregate_function_orthogonal_bitmap(AggregateFunctionSimpleFactory&
factory) {
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
index cb903ee268..998ccfd097 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
@@ -215,8 +215,7 @@ public:
String get_name() const override { return Impl::name; }
AggFunctionOrthBitmapFunc(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper<Impl,
AggFunctionOrthBitmapFunc<Impl>>(argument_types_,
-
{}),
+ : IAggregateFunctionDataHelper<Impl,
AggFunctionOrthBitmapFunc<Impl>>(argument_types_),
_argument_size(argument_types_.size()) {}
DataTypePtr get_return_type() const override { return
Impl::get_return_type(); }
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.cpp
b/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.cpp
index 82c0863fec..9548663b57 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.cpp
@@ -25,7 +25,6 @@ namespace doris::vectorized {
template <bool is_nullable>
AggregateFunctionPtr create_aggregate_function_percentile_approx(const
std::string& name,
const
DataTypes& argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
if (argument_types.size() == 1) {
return
std::make_shared<AggregateFunctionPercentileApproxMerge<is_nullable>>(
@@ -44,19 +43,13 @@ AggregateFunctionPtr
create_aggregate_function_percentile_approx(const std::stri
AggregateFunctionPtr create_aggregate_function_percentile(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<AggregateFunctionPercentile>(argument_types);
}
AggregateFunctionPtr create_aggregate_function_percentile_array(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<AggregateFunctionPercentileArray>(argument_types);
}
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.h
b/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.h
index 4008040717..007dccbfac 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_percentile_approx.h
@@ -127,8 +127,7 @@ class AggregateFunctionPercentileApprox
public:
AggregateFunctionPercentileApprox(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<PercentileApproxState,
-
AggregateFunctionPercentileApprox>(argument_types_, {}) {
- }
+
AggregateFunctionPercentileApprox>(argument_types_) {}
String get_name() const override { return "percentile_approx"; }
@@ -358,7 +357,7 @@ class AggregateFunctionPercentile final
public:
AggregateFunctionPercentile(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<PercentileState,
AggregateFunctionPercentile>(
- argument_types_, {}) {}
+ argument_types_) {}
String get_name() const override { return "percentile"; }
@@ -401,7 +400,7 @@ class AggregateFunctionPercentileArray final
public:
AggregateFunctionPercentileArray(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<PercentileState,
AggregateFunctionPercentileArray>(
- argument_types_, {}) {}
+ argument_types_) {}
String get_name() const override { return "percentile_array"; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_product.h
b/be/src/vec/aggregate_functions/aggregate_function_product.h
index 28af3ead15..ea5aba353d 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_product.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_product.h
@@ -91,12 +91,12 @@ public:
AggregateFunctionProduct(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<Data, AggregateFunctionProduct<T,
TResult, Data>>(
- argument_types_, {}),
+ argument_types_),
scale(0) {}
AggregateFunctionProduct(const IDataType& data_type, const DataTypes&
argument_types_)
: IAggregateFunctionDataHelper<Data, AggregateFunctionProduct<T,
TResult, Data>>(
- argument_types_, {}),
+ argument_types_),
scale(get_decimal_scale(data_type)) {}
DataTypePtr get_return_type() const override {
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h
b/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h
index 4b7c1e0c98..362bf68a46 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_reader_first_last.h
@@ -198,7 +198,7 @@ class ReaderFunctionData final
: public IAggregateFunctionDataHelper<Data, ReaderFunctionData<Data>> {
public:
ReaderFunctionData(const DataTypes& argument_types)
- : IAggregateFunctionDataHelper<Data,
ReaderFunctionData<Data>>(argument_types, {}),
+ : IAggregateFunctionDataHelper<Data,
ReaderFunctionData<Data>>(argument_types),
_argument_type(argument_types[0]) {}
String get_name() const override { return Data::name(); }
@@ -238,8 +238,7 @@ private:
template <template <typename> class AggregateFunctionTemplate, template
<typename> class Impl,
bool result_is_nullable, bool arg_is_nullable, bool is_copy = false>
static IAggregateFunction* create_function_single_value(const String& name,
- const DataTypes&
argument_types,
- const Array&
parameters) {
+ const DataTypes&
argument_types) {
auto type = remove_nullable(argument_types[0]);
WhichDataType which(*type);
@@ -255,27 +254,25 @@ static IAggregateFunction*
create_function_single_value(const String& name,
return nullptr;
}
-#define CREATE_READER_FUNCTION_WITH_NAME_AND_DATA(CREATE_FUNCTION_NAME,
FUNCTION_DATA) \
- template <bool is_copy>
\
- AggregateFunctionPtr CREATE_FUNCTION_NAME(const std::string& name,
\
- const DataTypes& argument_types,
\
- const Array& parameters, bool
result_is_nullable) { \
- const bool arg_is_nullable = argument_types[0]->is_nullable();
\
- AggregateFunctionPtr res = nullptr;
\
- std::visit(
\
- [&](auto result_is_nullable, auto arg_is_nullable) {
\
- res = AggregateFunctionPtr(
\
- create_function_single_value<ReaderFunctionData,
FUNCTION_DATA, \
- result_is_nullable,
arg_is_nullable, \
- is_copy>(name,
argument_types, \
-
parameters)); \
- },
\
- make_bool_variant(result_is_nullable),
make_bool_variant(arg_is_nullable)); \
- if (!res) {
\
- LOG(WARNING) << " failed in create_aggregate_function_" << name
\
- << " and type is: " << argument_types[0]->get_name();
\
- }
\
- return res;
\
+#define CREATE_READER_FUNCTION_WITH_NAME_AND_DATA(CREATE_FUNCTION_NAME,
FUNCTION_DATA) \
+ template <bool is_copy>
\
+ AggregateFunctionPtr CREATE_FUNCTION_NAME(
\
+ const std::string& name, const DataTypes& argument_types, bool
result_is_nullable) { \
+ const bool arg_is_nullable = argument_types[0]->is_nullable();
\
+ AggregateFunctionPtr res = nullptr;
\
+ std::visit(
\
+ [&](auto result_is_nullable, auto arg_is_nullable) {
\
+ res = AggregateFunctionPtr(
\
+ create_function_single_value<ReaderFunctionData,
FUNCTION_DATA, \
+ result_is_nullable,
arg_is_nullable, \
+ is_copy>(name,
argument_types)); \
+ },
\
+ make_bool_variant(result_is_nullable),
make_bool_variant(arg_is_nullable)); \
+ if (!res) {
\
+ LOG(WARNING) << " failed in create_aggregate_function_" << name
\
+ << " and type is: " << argument_types[0]->get_name();
\
+ }
\
+ return res;
\
}
CREATE_READER_FUNCTION_WITH_NAME_AND_DATA(create_aggregate_function_first,
ReaderFunctionFirstData);
diff --git a/be/src/vec/aggregate_functions/aggregate_function_retention.cpp
b/be/src/vec/aggregate_functions/aggregate_function_retention.cpp
index a84fa3bbe0..44c2baaaaf 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_retention.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_retention.cpp
@@ -25,7 +25,6 @@ namespace doris::vectorized {
AggregateFunctionPtr create_aggregate_function_retention(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return std::make_shared<AggregateFunctionRetention>(argument_types);
}
diff --git a/be/src/vec/aggregate_functions/aggregate_function_retention.h
b/be/src/vec/aggregate_functions/aggregate_function_retention.h
index db93e94a34..5a01e66810 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_retention.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_retention.h
@@ -93,7 +93,7 @@ class AggregateFunctionRetention
public:
AggregateFunctionRetention(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<RetentionState,
AggregateFunctionRetention>(
- argument_types_, {}) {}
+ argument_types_) {}
String get_name() const override { return "retention"; }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_rpc.h
b/be/src/vec/aggregate_functions/aggregate_function_rpc.h
index d7ac8f59e3..d102055ced 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_rpc.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_rpc.h
@@ -345,16 +345,14 @@ public:
class AggregateRpcUdaf final
: public IAggregateFunctionDataHelper<AggregateRpcUdafData,
AggregateRpcUdaf> {
public:
- AggregateRpcUdaf(const TFunction& fn, const DataTypes& argument_types,
const Array& parameters,
+ AggregateRpcUdaf(const TFunction& fn, const DataTypes& argument_types,
const DataTypePtr& return_type)
- : IAggregateFunctionDataHelper(argument_types, parameters),
- _fn(fn),
- _return_type(return_type) {}
+ : IAggregateFunctionDataHelper(argument_types), _fn(fn),
_return_type(return_type) {}
~AggregateRpcUdaf() = default;
static AggregateFunctionPtr create(const TFunction& fn, const DataTypes&
argument_types,
- const Array& parameters, const
DataTypePtr& return_type) {
- return std::make_shared<AggregateRpcUdaf>(fn, argument_types,
parameters, return_type);
+ const DataTypePtr& return_type) {
+ return std::make_shared<AggregateRpcUdaf>(fn, argument_types,
return_type);
}
void create(AggregateDataPtr __restrict place) const override {
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
index 61685f69ba..13ed539f87 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.cpp
@@ -27,7 +27,6 @@ namespace doris::vectorized {
template <template <typename, typename> typename AggregateFunction>
AggregateFunctionPtr create_aggregate_function_sequence_base(const
std::string& name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
const auto arg_count = argument_types.size();
diff --git a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
index 75541fade2..4fe5b075f1 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h
@@ -566,7 +566,7 @@ public:
AggregateFunctionSequenceBase(const DataTypes& arguments)
: IAggregateFunctionDataHelper<
AggregateFunctionSequenceMatchData<DateValueType,
NativeType, Derived>,
- Derived>(arguments, {}) {
+ Derived>(arguments) {
arg_count = arguments.size();
}
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.cpp
b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.cpp
index e49246035c..d42ae77c41 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.cpp
@@ -85,7 +85,6 @@ AggregateFunctionSimpleFactory&
AggregateFunctionSimpleFactory::instance() {
register_aggregate_function_collect_list(instance);
register_aggregate_function_sequence_match(instance);
register_aggregate_function_avg_weighted(instance);
- register_aggregate_function_avg_weighted(instance);
register_aggregate_function_histogram(instance);
// if you only register function with no nullable, and wants to add
nullable automatically, you should place function above this line
diff --git a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
index 3751c6b762..12298d8aa8 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
@@ -33,8 +33,8 @@
namespace doris::vectorized {
using DataTypePtr = std::shared_ptr<const IDataType>;
using DataTypes = std::vector<DataTypePtr>;
-using AggregateFunctionCreator = std::function<AggregateFunctionPtr(
- const std::string&, const DataTypes&, const Array&, const bool)>;
+using AggregateFunctionCreator =
+ std::function<AggregateFunctionPtr(const std::string&, const
DataTypes&, const bool)>;
class AggregateFunctionSimpleFactory {
public:
@@ -73,7 +73,7 @@ public:
}
AggregateFunctionPtr get(const std::string& name, const DataTypes&
argument_types,
- const Array& parameters, const bool
result_is_nullable = false) {
+ const bool result_is_nullable = false) {
bool nullable = false;
for (const auto& type : argument_types) {
if (type->is_nullable()) {
@@ -90,11 +90,11 @@ public:
return nullable_aggregate_functions.find(name_str) ==
nullable_aggregate_functions.end()
? nullptr
: nullable_aggregate_functions[name_str](name_str,
argument_types,
-
parameters, result_is_nullable);
+
result_is_nullable);
} else {
return aggregate_functions.find(name_str) ==
aggregate_functions.end()
? nullptr
- : aggregate_functions[name_str](name_str,
argument_types, parameters,
+ : aggregate_functions[name_str](name_str,
argument_types,
result_is_nullable);
}
}
diff --git a/be/src/vec/aggregate_functions/aggregate_function_sort.h
b/be/src/vec/aggregate_functions/aggregate_function_sort.h
index d51ae9106f..4abdb9c980 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sort.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_sort.h
@@ -105,8 +105,7 @@ private:
public:
AggregateFunctionSort(const AggregateFunctionPtr& nested_func, const
DataTypes& arguments,
const SortDescription& sort_desc, const
RuntimeState* state)
- : IAggregateFunctionDataHelper<Data, AggregateFunctionSort>(
- arguments, nested_func->get_parameters()),
+ : IAggregateFunctionDataHelper<Data,
AggregateFunctionSort>(arguments),
_nested_func(nested_func),
_arguments(arguments),
_sort_desc(sort_desc),
diff --git a/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
b/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
index b83c9043bd..8373f12383 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
@@ -27,8 +27,7 @@ template <template <typename, bool> class
AggregateFunctionTemplate,
template <typename> class NameData, template <typename, typename>
class Data,
bool is_stddev, bool is_nullable = false>
static IAggregateFunction* create_function_single_value(const String& name,
- const DataTypes&
argument_types,
- const Array&
parameters) {
+ const DataTypes&
argument_types) {
auto type = argument_types[0].get();
if (type->is_nullable()) {
type = assert_cast<const
DataTypeNullable*>(type)->get_nested_type().get();
@@ -70,41 +69,37 @@ static IAggregateFunction*
create_function_single_value(const String& name,
template <bool is_stddev, bool is_nullable>
AggregateFunctionPtr create_aggregate_function_variance_samp(const
std::string& name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_function_single_value<AggregateFunctionSamp,
VarianceSampName, SampData,
- is_stddev, is_nullable>(name,
argument_types, parameters));
+ is_stddev, is_nullable>(name,
argument_types));
}
template <bool is_stddev, bool is_nullable>
AggregateFunctionPtr create_aggregate_function_stddev_samp(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_function_single_value<AggregateFunctionSamp,
StddevSampName, SampData, is_stddev,
- is_nullable>(name, argument_types,
parameters));
+ is_nullable>(name, argument_types));
}
template <bool is_stddev>
AggregateFunctionPtr create_aggregate_function_variance_pop(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_function_single_value<AggregateFunctionPop, VarianceName,
PopData, is_stddev>(
- name, argument_types, parameters));
+ name, argument_types));
}
template <bool is_stddev>
AggregateFunctionPtr create_aggregate_function_stddev_pop(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
return AggregateFunctionPtr(
create_function_single_value<AggregateFunctionPop, StddevName,
PopData, is_stddev>(
- name, argument_types, parameters));
+ name, argument_types));
}
void
register_aggregate_function_stddev_variance_pop(AggregateFunctionSimpleFactory&
factory) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_stddev.h
b/be/src/vec/aggregate_functions/aggregate_function_stddev.h
index 71755f5534..63ce35b9c1 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_stddev.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_stddev.h
@@ -258,7 +258,7 @@ public:
AggregateFunctionSampVariance(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<
Data, AggregateFunctionSampVariance<is_pop, Data,
is_nullable>>(
- argument_types_, {}) {}
+ argument_types_) {}
String get_name() const override { return Data::name(); }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_sum.cpp
b/be/src/vec/aggregate_functions/aggregate_function_sum.cpp
index 75d4d36414..1e24237e65 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sum.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_sum.cpp
@@ -44,18 +44,16 @@ using AggregateFunctionSumSimple = typename
SumSimple<T>::Function;
template <template <typename> class Function>
AggregateFunctionPtr create_aggregate_function_sum(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
AggregateFunctionPtr res;
DataTypePtr data_type = argument_types[0];
if (data_type->is_nullable()) {
auto no_null_argument_types = remove_nullable(argument_types);
if (is_decimal(no_null_argument_types[0])) {
-
res.reset(create_with_decimal_type_null<Function>(no_null_argument_types,
parameters,
-
*no_null_argument_types[0],
-
no_null_argument_types));
+ res.reset(create_with_decimal_type_null<Function>(
+ no_null_argument_types, *no_null_argument_types[0],
no_null_argument_types));
} else {
-
res.reset(create_with_numeric_type_null<Function>(no_null_argument_types,
parameters,
+
res.reset(create_with_numeric_type_null<Function>(no_null_argument_types,
no_null_argument_types));
}
} else {
@@ -86,10 +84,9 @@ using AggregateFunctionSumSimpleReader = typename
SumSimpleReader<T>::Function;
AggregateFunctionPtr create_aggregate_function_sum_reader(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
- return create_aggregate_function_sum<AggregateFunctionSumSimpleReader>(
- name, argument_types, parameters, result_is_nullable);
+ return
create_aggregate_function_sum<AggregateFunctionSumSimpleReader>(name,
argument_types,
+
result_is_nullable);
}
void register_aggregate_function_sum(AggregateFunctionSimpleFactory& factory) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_sum.h
b/be/src/vec/aggregate_functions/aggregate_function_sum.h
index 46ca85f3a9..fb82295580 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sum.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_sum.h
@@ -58,12 +58,12 @@ public:
AggregateFunctionSum(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<Data, AggregateFunctionSum<T,
TResult, Data>>(
- argument_types_, {}),
+ argument_types_),
scale(0) {}
AggregateFunctionSum(const IDataType& data_type, const DataTypes&
argument_types_)
: IAggregateFunctionDataHelper<Data, AggregateFunctionSum<T,
TResult, Data>>(
- argument_types_, {}),
+ argument_types_),
scale(get_decimal_scale(data_type)) {}
DataTypePtr get_return_type() const override {
@@ -160,7 +160,6 @@ private:
AggregateFunctionPtr create_aggregate_function_sum_reader(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable);
} // namespace doris::vectorized
diff --git a/be/src/vec/aggregate_functions/aggregate_function_topn.cpp
b/be/src/vec/aggregate_functions/aggregate_function_topn.cpp
index af10e103f1..cb4224a322 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_topn.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_topn.cpp
@@ -23,7 +23,6 @@ namespace doris::vectorized {
AggregateFunctionPtr create_aggregate_function_topn(const std::string& name,
const DataTypes&
argument_types,
- const Array& parameters,
const bool
result_is_nullable) {
if (argument_types.size() == 2) {
return AggregateFunctionPtr(
@@ -83,7 +82,6 @@ AggregateFunctionPtr create_topn_array(const DataTypes&
argument_types) {
AggregateFunctionPtr create_aggregate_function_topn_array(const std::string&
name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
bool has_default_param = (argument_types.size() == 3);
if (has_default_param) {
@@ -95,7 +93,6 @@ AggregateFunctionPtr
create_aggregate_function_topn_array(const std::string& nam
AggregateFunctionPtr create_aggregate_function_topn_weighted(const
std::string& name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
bool has_default_param = (argument_types.size() == 4);
if (has_default_param) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_topn.h
b/be/src/vec/aggregate_functions/aggregate_function_topn.h
index cc5d3f6d3d..99ec3dadd9 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_topn.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_topn.h
@@ -263,8 +263,7 @@ class AggregateFunctionTopNBase
public:
AggregateFunctionTopNBase(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<AggregateFunctionTopNData<T>,
- AggregateFunctionTopNBase<Impl,
T>>(argument_types_,
-
{}) {}
+ AggregateFunctionTopNBase<Impl,
T>>(argument_types_) {}
void add(AggregateDataPtr __restrict place, const IColumn** columns,
size_t row_num,
Arena*) const override {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_uniq.cpp
b/be/src/vec/aggregate_functions/aggregate_function_uniq.cpp
index 450327ed65..dd42b16f2c 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_uniq.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_uniq.cpp
@@ -31,10 +31,7 @@ namespace doris::vectorized {
template <template <typename> class Data, typename DataForVariadic>
AggregateFunctionPtr create_aggregate_function_uniq(const std::string& name,
const DataTypes&
argument_types,
- const Array& params,
const bool
result_is_nullable) {
- assert_no_parameters(name, params);
-
if (argument_types.empty()) {
LOG(WARNING) << "Incorrect number of arguments for aggregate function
" << name;
return nullptr;
diff --git a/be/src/vec/aggregate_functions/aggregate_function_uniq.h
b/be/src/vec/aggregate_functions/aggregate_function_uniq.h
index 846621360f..ff17082752 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_uniq.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_uniq.h
@@ -90,8 +90,7 @@ class AggregateFunctionUniq final
public:
using KeyType = std::conditional_t<std::is_same_v<T, String>, UInt128, T>;
AggregateFunctionUniq(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T,
Data>>(argument_types_,
-
{}) {}
+ : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T,
Data>>(argument_types_) {}
String get_name() const override { return Data::get_name(); }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_window.cpp
b/be/src/vec/aggregate_functions/aggregate_function_window.cpp
index 4714bd2609..7bb9e94524 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_window.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_window.cpp
@@ -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) {
\
diff --git a/be/src/vec/aggregate_functions/aggregate_function_window.h
b/be/src/vec/aggregate_functions/aggregate_function_window.h
index c0d37f8e80..03cc74184b 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_window.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_window.h
@@ -41,7 +41,7 @@ class WindowFunctionRowNumber final
: public IAggregateFunctionDataHelper<RowNumberData,
WindowFunctionRowNumber> {
public:
WindowFunctionRowNumber(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper(argument_types_, {}) {}
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "row_number"; }
@@ -79,7 +79,7 @@ struct RankData {
class WindowFunctionRank final : public IAggregateFunctionDataHelper<RankData,
WindowFunctionRank> {
public:
WindowFunctionRank(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper(argument_types_, {}) {}
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "rank"; }
@@ -123,7 +123,7 @@ class WindowFunctionDenseRank final
: public IAggregateFunctionDataHelper<DenseRankData,
WindowFunctionDenseRank> {
public:
WindowFunctionDenseRank(const DataTypes& argument_types_)
- : IAggregateFunctionDataHelper(argument_types_, {}) {}
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "dense_rank"; }
@@ -164,8 +164,8 @@ struct NTileData {
class WindowFunctionNTile final
: public IAggregateFunctionDataHelper<NTileData, WindowFunctionNTile> {
public:
- WindowFunctionNTile(const DataTypes& argument_types_, const Array&
parameters)
- : IAggregateFunctionDataHelper(argument_types_, parameters) {}
+ WindowFunctionNTile(const DataTypes& argument_types_)
+ : IAggregateFunctionDataHelper(argument_types_) {}
String get_name() const override { return "ntile"; }
@@ -370,7 +370,7 @@ class WindowFunctionData final
: public IAggregateFunctionDataHelper<Data, WindowFunctionData<Data>> {
public:
WindowFunctionData(const DataTypes& argument_types)
- : IAggregateFunctionDataHelper<Data,
WindowFunctionData<Data>>(argument_types, {}),
+ : IAggregateFunctionDataHelper<Data,
WindowFunctionData<Data>>(argument_types),
_argument_type(argument_types[0]) {}
String get_name() const override { return Data::name(); }
diff --git
a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.cpp
b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.cpp
index 2dfa86df7a..d778ee9c13 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.cpp
@@ -24,7 +24,6 @@ namespace doris::vectorized {
AggregateFunctionPtr create_aggregate_function_window_funnel(const
std::string& name,
const DataTypes&
argument_types,
- const Array&
parameters,
const bool
result_is_nullable) {
if (argument_types.size() < 3) {
LOG(WARNING) << "window_funnel's argument less than 3.";
diff --git a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h
b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h
index a2d6dd8b4c..0b86e8f23b 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_window_funnel.h
@@ -168,8 +168,7 @@ public:
AggregateFunctionWindowFunnel(const DataTypes& argument_types_)
: IAggregateFunctionDataHelper<
WindowFunnelState<DateValueType, NativeType>,
- AggregateFunctionWindowFunnel<DateValueType,
NativeType>>(argument_types_,
-
{}) {}
+ AggregateFunctionWindowFunnel<DateValueType,
NativeType>>(argument_types_) {}
String get_name() const override { return "window_funnel"; }
diff --git a/be/src/vec/aggregate_functions/factory_helpers.h
b/be/src/vec/aggregate_functions/factory_helpers.h
index b93d422d27..76958d9bbf 100644
--- a/be/src/vec/aggregate_functions/factory_helpers.h
+++ b/be/src/vec/aggregate_functions/factory_helpers.h
@@ -26,10 +26,6 @@
namespace doris::vectorized {
-inline void assert_no_parameters(const std::string& name, const Array&
parameters) {
- CHECK(parameters.empty()) << fmt::format("Aggregate function {} cannot
have parameters", name);
-}
-
inline void assert_unary(const std::string& name, const DataTypes&
argument_types) {
CHECK_EQ(argument_types.size(), 1)
<< fmt::format("Aggregate function {} require single argument",
name);
diff --git a/be/src/vec/aggregate_functions/helpers.h
b/be/src/vec/aggregate_functions/helpers.h
index 0970a860a6..adca9a968a 100644
--- a/be/src/vec/aggregate_functions/helpers.h
+++ b/be/src/vec/aggregate_functions/helpers.h
@@ -62,13 +62,13 @@ static IAggregateFunction* create_with_numeric_type(const
IDataType& argument_ty
template <template <typename> class AggregateFunctionTemplate, typename...
TArgs>
static IAggregateFunction* create_with_numeric_type_null(const DataTypes&
argument_types,
- const Array& params,
TArgs&&... args) {
+ TArgs&&... args) {
WhichDataType which(argument_types[0]);
-#define DISPATCH(TYPE)
\
- if (which.idx == TypeIndex::TYPE)
\
- return new
AggregateFunctionNullUnaryInline<AggregateFunctionTemplate<TYPE>, true>(
\
- new
AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...), argument_types, \
- params);
+#define DISPATCH(TYPE)
\
+ if (which.idx == TypeIndex::TYPE)
\
+ return new
AggregateFunctionNullUnaryInline<AggregateFunctionTemplate<TYPE>, true>( \
+ new
AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...), \
+ argument_types);
FOR_NUMERIC_TYPES(DISPATCH)
#undef DISPATCH
return nullptr;
@@ -140,13 +140,13 @@ static IAggregateFunction* create_with_decimal_type(const
IDataType& argument_ty
template <template <typename> class AggregateFunctionTemplate, typename...
TArgs>
static IAggregateFunction* create_with_decimal_type_null(const DataTypes&
argument_types,
- const Array& params,
TArgs&&... args) {
+ TArgs&&... args) {
WhichDataType which(argument_types[0]);
-#define DISPATCH(TYPE)
\
- if (which.idx == TypeIndex::TYPE)
\
- return new
AggregateFunctionNullUnaryInline<AggregateFunctionTemplate<TYPE>, true>(
\
- new
AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...), argument_types, \
- params);
+#define DISPATCH(TYPE)
\
+ if (which.idx == TypeIndex::TYPE)
\
+ return new
AggregateFunctionNullUnaryInline<AggregateFunctionTemplate<TYPE>, true>( \
+ new
AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...), \
+ argument_types);
FOR_DECIMAL_TYPES(DISPATCH)
#undef DISPATCH
return nullptr;
diff --git a/be/src/vec/exprs/vectorized_agg_fn.cpp
b/be/src/vec/exprs/vectorized_agg_fn.cpp
index bdeba41688..ec7f2ef6f2 100644
--- a/be/src/vec/exprs/vectorized_agg_fn.cpp
+++ b/be/src/vec/exprs/vectorized_agg_fn.cpp
@@ -114,7 +114,7 @@ Status AggFnEvaluator::prepare(RuntimeState* state, const
RowDescriptor& desc,
if (_fn.binary_type == TFunctionBinaryType::JAVA_UDF) {
if (config::enable_java_support) {
- _function = AggregateJavaUdaf::create(_fn, argument_types, {},
_data_type);
+ _function = AggregateJavaUdaf::create(_fn, argument_types,
_data_type);
RETURN_IF_ERROR(static_cast<AggregateJavaUdaf*>(_function.get())->check_udaf(_fn));
} else {
return Status::InternalError(
@@ -122,10 +122,10 @@ Status AggFnEvaluator::prepare(RuntimeState* state, const
RowDescriptor& desc,
"true and restart be.");
}
} else if (_fn.binary_type == TFunctionBinaryType::RPC) {
- _function = AggregateRpcUdaf::create(_fn, argument_types, {},
_data_type);
+ _function = AggregateRpcUdaf::create(_fn, argument_types, _data_type);
} else {
_function = AggregateFunctionSimpleFactory::instance().get(
- _fn.name.function_name, argument_types, {},
_data_type->is_nullable());
+ _fn.name.function_name, argument_types,
_data_type->is_nullable());
}
if (_function == nullptr) {
return Status::InternalError("Agg Function {} is not implemented",
_fn.signature);
diff --git a/be/src/vec/functions/array/function_array_aggregation.cpp
b/be/src/vec/functions/array/function_array_aggregation.cpp
index 94218de9b2..0897ce890b 100644
--- a/be/src/vec/functions/array/function_array_aggregation.cpp
+++ b/be/src/vec/functions/array/function_array_aggregation.cpp
@@ -130,7 +130,7 @@ struct AggregateFunction {
AggregateFunctionPtr function;
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
-
{make_nullable(data_type_ptr)}, {}));
+
{make_nullable(data_type_ptr)}));
return function;
}
};
@@ -238,11 +238,11 @@ 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));
+ create_aggregate_function_min(NameArrayMin::name, data_types,
false));
AggregateFunctionPtr function;
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
-
{make_nullable(data_type_ptr)}, {}));
+
{make_nullable(data_type_ptr)}));
return function;
}
};
@@ -256,11 +256,11 @@ 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));
+ create_aggregate_function_max(NameArrayMax::name, data_types,
false));
AggregateFunctionPtr function;
function.reset(new AggregateFunctionNullUnary<true>(nested_function,
-
{make_nullable(data_type_ptr)}, {}));
+
{make_nullable(data_type_ptr)}));
return function;
}
};
diff --git a/be/test/vec/aggregate_functions/agg_collect_test.cpp
b/be/test/vec/aggregate_functions/agg_collect_test.cpp
index 609fc41210..737c76d1da 100644
--- a/be/test/vec/aggregate_functions/agg_collect_test.cpp
+++ b/be/test/vec/aggregate_functions/agg_collect_test.cpp
@@ -74,9 +74,8 @@ public:
void test_agg_collect(const std::string& fn_name, size_t input_nums = 0) {
DataTypes data_types = {(DataTypePtr)std::make_shared<DataType>()};
LOG(INFO) << "test_agg_collect for " << fn_name << "(" <<
data_types[0]->get_name() << ")";
- Array array;
AggregateFunctionSimpleFactory factory =
AggregateFunctionSimpleFactory::instance();
- auto agg_function = factory.get(fn_name, data_types, array);
+ auto agg_function = factory.get(fn_name, data_types);
EXPECT_NE(agg_function, nullptr);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
diff --git a/be/test/vec/aggregate_functions/agg_histogram_test.cpp
b/be/test/vec/aggregate_functions/agg_histogram_test.cpp
index 545e118568..aa0b0d92ee 100644
--- a/be/test/vec/aggregate_functions/agg_histogram_test.cpp
+++ b/be/test/vec/aggregate_functions/agg_histogram_test.cpp
@@ -108,9 +108,8 @@ public:
LOG(INFO) << "test_agg_histogram for type"
<< "(" << data_types[0]->get_name() << ")";
- Array array;
AggregateFunctionSimpleFactory factory =
AggregateFunctionSimpleFactory::instance();
- auto agg_function = factory.get("histogram", data_types, array);
+ auto agg_function = factory.get("histogram", data_types);
EXPECT_NE(agg_function, nullptr);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
diff --git a/be/test/vec/aggregate_functions/agg_min_max_by_test.cpp
b/be/test/vec/aggregate_functions/agg_min_max_by_test.cpp
index 2008ce2d87..96b6e36a35 100644
--- a/be/test/vec/aggregate_functions/agg_min_max_by_test.cpp
+++ b/be/test/vec/aggregate_functions/agg_min_max_by_test.cpp
@@ -67,8 +67,7 @@ TEST_P(AggMinMaxByTest, min_max_by_test) {
DataTypes data_types = {std::make_shared<DataTypeInt32>(),
i == 0 ?
(DataTypePtr)std::make_shared<DataTypeInt32>()
:
(DataTypePtr)std::make_shared<DataTypeString>()};
- Array array;
- auto agg_function = factory.get(min_max_by_type, data_types, array);
+ auto agg_function = factory.get(min_max_by_type, data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
diff --git a/be/test/vec/aggregate_functions/agg_min_max_test.cpp
b/be/test/vec/aggregate_functions/agg_min_max_test.cpp
index 873768e92e..e5b5f4cb44 100644
--- a/be/test/vec/aggregate_functions/agg_min_max_test.cpp
+++ b/be/test/vec/aggregate_functions/agg_min_max_test.cpp
@@ -49,8 +49,7 @@ TEST_P(AggMinMaxTest, min_max_test) {
AggregateFunctionSimpleFactory factory;
register_aggregate_function_minmax(factory);
DataTypes data_types = {std::make_shared<DataTypeInt32>()};
- Array array;
- auto agg_function = factory.get(min_max_type, data_types, array);
+ auto agg_function = factory.get(min_max_type, data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
@@ -82,8 +81,7 @@ TEST_P(AggMinMaxTest, min_max_decimal_test) {
AggregateFunctionSimpleFactory factory;
register_aggregate_function_minmax(factory);
DataTypes data_types = {data_type};
- Array array;
- auto agg_function = factory.get(min_max_type, data_types, array);
+ auto agg_function = factory.get(min_max_type, data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
@@ -130,8 +128,7 @@ TEST_P(AggMinMaxTest, min_max_string_test) {
AggregateFunctionSimpleFactory factory;
register_aggregate_function_minmax(factory);
DataTypes data_types = {std::make_shared<DataTypeString>()};
- Array array;
- auto agg_function = factory.get(min_max_type, data_types, array);
+ auto agg_function = factory.get(min_max_type, data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
diff --git a/be/test/vec/aggregate_functions/agg_test.cpp
b/be/test/vec/aggregate_functions/agg_test.cpp
index 951b1b8e3b..08aaa92c78 100644
--- a/be/test/vec/aggregate_functions/agg_test.cpp
+++ b/be/test/vec/aggregate_functions/agg_test.cpp
@@ -44,8 +44,7 @@ TEST(AggTest, basic_test) {
register_aggregate_function_sum(factory);
DataTypePtr data_type(std::make_shared<DataTypeInt32>());
DataTypes data_types = {data_type};
- Array array;
- auto agg_function = factory.get("sum", data_types, array);
+ auto agg_function = factory.get("sum", data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
@@ -76,9 +75,8 @@ TEST(AggTest, topn_test) {
AggregateFunctionSimpleFactory factory;
register_aggregate_function_topn(factory);
DataTypes data_types = {std::make_shared<DataTypeString>(),
std::make_shared<DataTypeInt32>()};
- Array array;
- auto agg_function = factory.get("topn", data_types, array);
+ auto agg_function = factory.get("topn", data_types);
std::unique_ptr<char[]> memory(new char[agg_function->size_of_data()]);
AggregateDataPtr place = memory.get();
agg_function->create(place);
diff --git a/be/test/vec/aggregate_functions/vec_retention_test.cpp
b/be/test/vec/aggregate_functions/vec_retention_test.cpp
index 223d3192d2..2033ea3be4 100644
--- a/be/test/vec/aggregate_functions/vec_retention_test.cpp
+++ b/be/test/vec/aggregate_functions/vec_retention_test.cpp
@@ -46,8 +46,7 @@ public:
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>(),
};
- Array array;
- agg_function = factory.get("retention", data_types, array, false);
+ agg_function = factory.get("retention", data_types, false);
EXPECT_NE(agg_function, nullptr);
}
diff --git a/be/test/vec/aggregate_functions/vec_sequence_match_test.cpp
b/be/test/vec/aggregate_functions/vec_sequence_match_test.cpp
index 763ecdc08c..fb507e451b 100644
--- a/be/test/vec/aggregate_functions/vec_sequence_match_test.cpp
+++ b/be/test/vec/aggregate_functions/vec_sequence_match_test.cpp
@@ -43,10 +43,9 @@ public:
std::make_shared<DataTypeString>(),
std::make_shared<DataTypeDateTime>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>()};
- Array array;
- agg_function_sequence_match = factory.get("sequence_match",
data_types, array, false);
+ agg_function_sequence_match = factory.get("sequence_match",
data_types, false);
EXPECT_NE(agg_function_sequence_match, nullptr);
- agg_function_sequence_count = factory.get("sequence_count",
data_types, array, false);
+ agg_function_sequence_count = factory.get("sequence_count",
data_types, false);
EXPECT_NE(agg_function_sequence_count, nullptr);
}
@@ -180,8 +179,7 @@ TEST_F(VSequenceMatchTest, testCountSerialize) {
DataTypes data_types = {std::make_shared<DataTypeString>(),
std::make_shared<DataTypeDateTime>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>()};
- Array array;
- agg_function_sequence_count = factory.get("sequence_count", data_types,
array, false);
+ agg_function_sequence_count = factory.get("sequence_count", data_types,
false);
EXPECT_NE(agg_function_sequence_count, nullptr);
const int NUM_CONDS = 4;
@@ -246,8 +244,7 @@ TEST_F(VSequenceMatchTest,
testMatchReverseSortedSerializeMerge) {
DataTypes data_types = {std::make_shared<DataTypeString>(),
std::make_shared<DataTypeDateTime>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>()};
- Array array;
- agg_function_sequence_match = factory.get("sequence_match", data_types,
array, false);
+ agg_function_sequence_match = factory.get("sequence_match", data_types,
false);
EXPECT_NE(agg_function_sequence_match, nullptr);
const int NUM_CONDS = 2;
@@ -336,8 +333,7 @@ TEST_F(VSequenceMatchTest,
testCountReverseSortedSerializeMerge) {
DataTypes data_types = {std::make_shared<DataTypeString>(),
std::make_shared<DataTypeDateTime>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>()};
- Array array;
- agg_function_sequence_count = factory.get("sequence_count", data_types,
array, false);
+ agg_function_sequence_count = factory.get("sequence_count", data_types,
false);
EXPECT_NE(agg_function_sequence_count, nullptr);
const int NUM_CONDS = 2;
diff --git a/be/test/vec/aggregate_functions/vec_window_funnel_test.cpp
b/be/test/vec/aggregate_functions/vec_window_funnel_test.cpp
index 50bf612fd2..6f7215d990 100644
--- a/be/test/vec/aggregate_functions/vec_window_funnel_test.cpp
+++ b/be/test/vec/aggregate_functions/vec_window_funnel_test.cpp
@@ -42,8 +42,7 @@ public:
std::make_shared<DataTypeDateTime>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>(),
std::make_shared<DataTypeUInt8>()};
- Array array;
- agg_function = factory.get("window_funnel", data_types, array, false);
+ agg_function = factory.get("window_funnel", data_types, false);
EXPECT_NE(agg_function, nullptr);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]