You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dan Monroe (Jira)" <ji...@apache.org> on 2020/05/02 21:20:00 UTC

[jira] [Created] (SPARK-31628) Missing sql function, "replace".

Dan Monroe created SPARK-31628:
----------------------------------

             Summary: Missing sql function, "replace".
                 Key: SPARK-31628
                 URL: https://issues.apache.org/jira/browse/SPARK-31628
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.4.4
         Environment: Tested on v 2.4.4, spark-shell and in Scala Spark application.
            Reporter: Dan Monroe


In the spark sql functions docs, there is a function called [replace|[https://spark.apache.org/docs/latest/api/sql/index.html#replace]]; a non-regex string replace function that should have existed since 2.3.0.

In the spark-shell and in Scala Spark apps (2.4.4) I cannot find this function inside of the `org.apache.spark.sql.functions` package, and it does not appear to be defined in this file for these versions:

[https://github.com/apache/spark/blob/v2.3.0/sql/core/src/main/scala/org/apache/spark/sql/functions.scala]

[https://github.com/apache/spark/blob/v2.4.4/sql/core/src/main/scala/org/apache/spark/sql/functions.scala]

 

However, I can find it in the function registry:

[https://github.com/apache/spark/blob/v2.3.0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L338]

[https://github.com/apache/spark/blob/v2.4.4/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L337]

 

It's not a huge deal because there is still "regexp_replace", it's just a little misleading.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org