Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/7709#discussion_r36106050
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -1927,6 +1927,17 @@ 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 srcString 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(srcString: Column, matchingString: String, replaceString:
String): Column =
--- End diff --
Using `src` instead `strString` will be better.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]