itholic commented on code in PR #38177:
URL: https://github.com/apache/spark/pull/38177#discussion_r1002888243
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala:
##########
@@ -1124,8 +1124,9 @@ class StringExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
).foreach { case (str: String, format: String) =>
val toNumberExpr = ToNumber(Literal(str), Literal(format))
assert(toNumberExpr.checkInputDataTypes() ==
TypeCheckResult.TypeCheckSuccess)
- checkExceptionInExpression[IllegalArgumentException](
- toNumberExpr, "does not match the given number format")
+
+ checkExceptionInExpression[SparkException](
+ toNumberExpr, "[INTERNAL_ERROR] Undefined error message parameter")
Review Comment:
Sorry for late responding, @MaxGekk .
I've been thinking about if there is better way to test expression with
error class here.
Please let me know if there is better way to test this ? 🙏
--
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]