Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/7468#discussion_r35071715
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala
---
@@ -464,6 +464,41 @@ class StringExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper {
checkEvaluation(StringSpace(s1), null, row2)
}
+ test("RegexReplace") {
+ val row1 = create_row("100-200", "(\\d+)", "num")
--- End diff --
Maybe we could add a new test suite to test expressions with mutable
states(like this one and the Rand), focus on testing the behavior of the
expression across multiply evaluations, and using literal here to test the
functionality with one time evaluation.
---
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]