From 80988e41ab94ebd24f94b9e24c313269d178b7d2 Mon Sep 17 00:00:00 2001 From: rui-mo Date: Wed, 18 Oct 2023 09:12:15 +0800 Subject: [PATCH] Add registerCompanionFunctions and overwrite as parameters in agg registration (7110) --- .../lib/aggregates/BitwiseAggregateBase.h | 9 ++++- .../aggregates/BitwiseAggregates.cpp | 11 +++-- .../prestosql/aggregates/CountAggregate.cpp | 16 ++++++-- .../aggregates/CovarianceAggregates.cpp | 29 ++++++++++---- .../prestosql/aggregates/MinMaxAggregates.cpp | 18 ++++++--- .../aggregates/RegisterAggregateFunctions.cpp | 40 ++++++++++++++----- .../aggregates/RegisterAggregateFunctions.h | 5 ++- .../aggregates/VarianceAggregates.cpp | 32 ++++++++++----- .../sparksql/aggregates/AverageAggregate.cpp | 8 +++- .../sparksql/aggregates/AverageAggregate.h | 5 ++- .../aggregates/BitwiseXorAggregate.cpp | 6 ++- .../sparksql/aggregates/BitwiseXorAggregate.h | 4 +- .../aggregates/FirstLastAggregate.cpp | 26 ++++++++---- .../sparksql/aggregates/MinMaxByAggregate.cpp | 20 +++++++--- .../sparksql/aggregates/Register.cpp | 26 +++++++----- .../functions/sparksql/aggregates/Register.h | 5 ++- .../sparksql/aggregates/SumAggregate.cpp | 9 ++++- .../sparksql/aggregates/SumAggregate.h | 5 ++- 18 files changed, 200 insertions(+), 74 deletions(-) diff --git a/velox/functions/lib/aggregates/BitwiseAggregateBase.h b/velox/functions/lib/aggregates/BitwiseAggregateBase.h index 428b905ea83c..d0b0efe298bd 100644 --- a/velox/functions/lib/aggregates/BitwiseAggregateBase.h +++ b/velox/functions/lib/aggregates/BitwiseAggregateBase.h @@ -70,7 +70,10 @@ class BitwiseAggregateBase : public SimpleNumericAggregate { }; template