MaxGekk commented on a change in pull request #27502: [SPARK-30759][SQL]
Initialize cache for foldable patterns in StringRegexExpression
URL: https://github.com/apache/spark/pull/27502#discussion_r376758701
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
##########
@@ -41,10 +41,12 @@ trait StringRegexExpression extends Expression
override def dataType: DataType = BooleanType
- // try cache the pattern for Literal
+ // try cache foldable pattern
private lazy val cache: Pattern = pattern match {
- case Literal(value: String, StringType) => compile(value)
Review comment:
Reynold just moved the code. Actually it exists since 1.0.0:
https://github.com/apache/spark/commit/af3746ce0d724dc624658a2187bde188ab26d084#diff-d788f93e29b4d25cdd7d60328587678bR42
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]