Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1863,14 +1863,15 @@ object functions {
def substring_index(str: Column, delim: String, count: Int): Column =
SubstringIndex(str.expr, lit(delim).expr, lit(count).expr)

/* Translate any character in the src by a character in replaceString.
* The characters in replaceString is corresponding to the characters in matchingString.
* The translate will happen when any character in the string matching with the character
* in the matchingString.
*
* @group string_funcs
* @since 1.5.0
*/
/**
* Translate any character in the src by a character in replaceString.
* The characters in replaceString is corresponding to the characters in matchingString.
* The translate will happen when any character in the string matching with the character
* in the matchingString.
*
* @group string_funcs
* @since 1.5.0
*/
def translate(src: Column, matchingString: String, replaceString: String): Column =
StringTranslate(src.expr, lit(matchingString).expr, lit(replaceString).expr)

Expand Down