yaooqinn commented on code in PR #42601:
URL: https://github.com/apache/spark/pull/42601#discussion_r1301702033
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala:
##########
@@ -637,14 +637,9 @@ case class RegExpReplace(subject: Expression, regexp:
Expression, rep: Expressio
override def nullSafeEval(s: Any, p: Any, r: Any, i: Any): Any = {
if (!p.equals(lastRegex)) {
- // regex value changed
- lastRegex = p.asInstanceOf[UTF8String].clone()
- try {
- pattern = Pattern.compile(lastRegex.toString)
Review Comment:
Yeah. They shall be updated at the same time. Exprs like
regexp_extract/regexp_extract_all once had the same issue but has been fixed
--
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]