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.