You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/24 05:15:37 UTC

[GitHub] [spark] itholic commented on a diff in pull request #38177: [SPARK-40663][SQL](Final) Migrate execution errors onto error classes

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org