jiwen624 commented on code in PR #57858:
URL: https://github.com/apache/spark/pull/57858#discussion_r3738608630
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala:
##########
@@ -330,29 +331,47 @@ object Mask {
val transformedString = if (input == null) {
null
} else {
- input.toString.map {
- transformChar(_, maskUpper, maskLower, maskDigit, maskOther).toChar
+ val upper = replacementCodePoint(maskUpper)
Review Comment:
Side change (not required by the BMP fix): the replacement lookup previously
ran per character, so `UTF8String.toString` allocated a new String for every
masked character. This optimized it by resolving the four arguments once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]