diff --git a/velox/functions/prestosql/registration/StringFunctionsRegistration.cpp b/velox/functions/prestosql/registration/StringFunctionsRegistration.cpp index 0e68c07af04e..aa7c0343f8b5 100644 --- a/velox/functions/prestosql/registration/StringFunctionsRegistration.cpp +++ b/velox/functions/prestosql/registration/StringFunctionsRegistration.cpp @@ -104,7 +104,10 @@ void registerStringFunctions(const std::string& prefix) { Varchar, Varchar>({prefix + "split_to_map"}); VELOX_REGISTER_VECTOR_FUNCTION(udf_concat, prefix + "concat"); - VELOX_REGISTER_VECTOR_FUNCTION(udf_replace, prefix + "replace"); + // In Gluten, presto 'replace' function is conflict with sparksql, because + // presto 'replace' is registered as VectorFunction, and spark 'replace' is + // registered as SimpleFunction. Velox respect VectorFunction first. + VELOX_REGISTER_VECTOR_FUNCTION(udf_replace, prefix + "presto_replace"); VELOX_REGISTER_VECTOR_FUNCTION(udf_reverse, prefix + "reverse"); VELOX_REGISTER_VECTOR_FUNCTION(udf_to_utf8, prefix + "to_utf8"); VELOX_REGISTER_VECTOR_FUNCTION(udf_from_utf8, prefix + "from_utf8");