From bc20a872ca9de01e1533998f996cf1b16f55caf4 Mon Sep 17 00:00:00 2001 From: rui-mo Date: Wed, 18 Oct 2023 11:46:05 +0800 Subject: [PATCH] Register agg functions with companion and overwrite --- cpp/velox/operators/functions/RegistrationAllFunctions.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/velox/operators/functions/RegistrationAllFunctions.cc b/cpp/velox/operators/functions/RegistrationAllFunctions.cc index 59262b1de196..cacd20cb6e0d 100644 --- a/cpp/velox/operators/functions/RegistrationAllFunctions.cc +++ b/cpp/velox/operators/functions/RegistrationAllFunctions.cc @@ -58,8 +58,10 @@ void registerAllFunctions() { // presto sql functions to overwrite the registration for same named functions. velox::functions::prestosql::registerAllScalarFunctions(); velox::functions::sparksql::registerFunctions(""); - velox::aggregate::prestosql::registerAllAggregateFunctions(); - velox::functions::aggregate::sparksql::registerAggregateFunctions(""); + velox::aggregate::prestosql::registerAllAggregateFunctions( + "", true /*registerCompanionFunctions*/, true /*overwrite*/); + velox::functions::aggregate::sparksql::registerAggregateFunctions( + "", true /*registerCompanionFunctions*/, true /*overwrite*/); velox::window::prestosql::registerAllWindowFunctions(); velox::functions::window::sparksql::registerWindowFunctions(""); // Using function overwrite to handle function names mismatch between Spark and Velox.