Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/7709#discussion_r35987252
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
---
@@ -283,6 +283,118 @@ case class EndsWith(left: Expression, right:
Expression)
}
}
+object StringTranslate {
+
+ def buildDict(matchingString: UTF8String, replaceString: UTF8String)
+ : JMap[Character, Character] = {
+ val matching = matchingString.toString()
+ val replace = replaceString.toString()
+ val dict = new HashMap[Character, Character]()
+ var i = 0
+ var j = 0
+ while (i < matching.length() && j < replace.length()) {
+ // For multiple mapping, the first one wins.
--- End diff --
Is this the designed behavior or come from Hive?
---
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]