MaxGekk commented on code in PR #40955:
URL: https://github.com/apache/spark/pull/40955#discussion_r1183383295


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RegexpExpressionsSuite.scala:
##########
@@ -391,12 +391,12 @@ class RegexpExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
     val row11 = create_row("100-200", "(\\d+)-(\\d+)", -1)
     val row12 = create_row("100-200", "\\d+", -1)
 
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row8, "Regex group count is 2, but the specified group index is 3")
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row9, "Regex group count is 1, but the specified group index is 2")
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row10, "Regex group count is 0, but the specified group index is 
1")
+    checkExceptionInExpression[SparkRuntimeException](

Review Comment:
   Could you use `checkErrorInExpression()` instead of 
`checkExceptionInExpression()` to don't depend on the error message anymore, 
please.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RegexpExpressionsSuite.scala:
##########
@@ -445,12 +445,12 @@ class RegexpExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
     val row12 = create_row("100-200,300-400,500-600", "(\\d+)-(\\d+)", -1)
     val row13 = create_row("100-200,300-400,500-600", "\\d+", -1)
 
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row9, "Regex group count is 2, but the specified group index is 3")
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row10, "Regex group count is 1, but the specified group index is 
2")
-    checkExceptionInExpression[IllegalArgumentException](
-      expr, row11, "Regex group count is 0, but the specified group index is 
1")
+    checkExceptionInExpression[SparkRuntimeException](

Review Comment:
   Please, use `checkErrorInExpression()`.



-- 
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]

Reply via email to