AngersZhuuuu commented on a change in pull request #32943:
URL: https://github.com/apache/spark/pull/32943#discussion_r658379512



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuiteBase.scala
##########
@@ -997,12 +997,12 @@ abstract class CastSuiteBase extends SparkFunSuite with 
ExpressionEvalHelper {
     }
 
     if (!isTryCast) {
-      Seq("INTERVAL '-106751991 04:00:54.775809' YEAR TO MONTH",
-        "INTERVAL '106751991 04:00:54.775808' YEAR TO MONTH").foreach { 
interval =>
-        val e = intercept[IllegalArgumentException] {
+      Seq("INTERVAL '-106751991 04:00:54.775809' DAY TO SECOND",
+        "INTERVAL '106751991 04:00:54.775808' DAY TO SECOND").foreach { 
interval =>
+        val e = intercept[ArithmeticException] {
           cast(Literal.create(interval), DayTimeIntervalType()).eval()
         }.getMessage
-        assert(e.contains("Interval string must match day-time format of"))
+        assert(e.contains("long overflow"))

Review comment:
       Here is a mistake when handle SPARK-35112




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

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