Skip to content

Commit

Permalink
Rename presto 'replace' function to 'presto_replace' to avoid conflic…
Browse files Browse the repository at this point in the history
…tion (workaround of 4922)
  • Loading branch information
marin-ma authored and rui-mo committed Jan 18, 2024
1 parent 4601a75 commit e969300
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e969300

Please sign in to comment.