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/08/22 16:27:15 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #37613: [SPARK-37944][SQL] Use error classes in the execution errors of casting

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


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -653,26 +653,6 @@ class QueryExecutionErrorsSuite
         "alternative" -> "",
         "config" -> SQLConf.ANSI_ENABLED.key))
   }
-
-  test("CAST_OVERFLOW: from long to ANSI intervals") {
-    Seq(
-      LongType -> "9223372036854775807L",
-      DecimalType(19, 0) -> "9223372036854775807BD").foreach { case (sourceType, sourceValue) =>
-      Seq("INTERVAL YEAR TO MONTH", "INTERVAL HOUR TO MINUTE").foreach { it =>
-        checkError(
-          exception = intercept[SparkArithmeticException] {
-            sql(s"select CAST($sourceValue AS $it)").collect()
-          },
-          errorClass = "CAST_OVERFLOW",

Review Comment:
   Why do you remove this check for `CAST_OVERFLOW`?



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