cloud-fan commented on code in PR #46077:
URL: https://github.com/apache/spark/pull/46077#discussion_r1577446659
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala:
##########
@@ -158,7 +162,9 @@ case class Like(left: Expression, right: Expression,
escapeChar: Char)
val regexStr =
StringEscapeUtils.escapeJava(escape(rVal.asInstanceOf[UTF8String].toString()))
val pattern = ctx.addMutableState(patternClass, "patternLike",
- v => s"""$v = $patternClass.compile("$regexStr");""")
+ v =>
+ s"""$v = $patternClass.compile("$regexStr",
+
|CollationSupport.collationAwareRegexFlags($collationId));""".stripMargin)
Review Comment:
`collationId` is static here. We should not generate java code to invoke
`collationAwareRegexFlags`, but simply generate java int literal using the
result of `collationAwareRegexFlags`
--
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]