spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Monroe (Jira)" <j...@apache.org>
Subject [jira] [Created] (SPARK-31628) Missing sql function, "replace".
Date Sat, 02 May 2020 21:20:00 GMT
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


Mime
View raw message