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


##########
sql/core/src/test/resources/sql-tests/analyzer-results/ansi/interval.sql.out:
##########
@@ -983,7 +983,7 @@ org.apache.spark.sql.catalyst.parser.ParseException
 {
   "errorClass" : "_LEGACY_ERROR_TEMP_0063",
   "messageParameters" : {
-    "msg" : "Interval string does not match day-time format of `[+|-]d h`, 
`INTERVAL [+|-]'[+|-]d h' DAY TO HOUR` when cast to interval day to hour: 20 
15:40:32.99899999, set spark.sql.legacy.fromDayTimeString.enabled to true to 
restore the behavior before Spark 3.0."
+    "msg" : "[INTERVAL_ERROR.UNMATCHED_FORMAT_STRING] Interval error. Interval 
string does not match day-time format of `[+|-]d h`, `INTERVAL [+|-]'[+|-]d h' 
DAY TO HOUR` when cast to interval day to hour: 20 15:40:32.99899999, set 
spark.sql.legacy.fromDayTimeString.enabled to true to restore the behavior 
before Spark 3.0.. SQLSTATE: 22009"

Review Comment:
   Let's bypass SparkThrowable here:
   
https://github.com/apache/spark/blob/30152d0ee938d64cadf8d4acd72115750f424e3b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L3402-L3408
   like:
   ```scala
           case st: SparkThrowable => throw st
           // Handle Exceptions thrown by CalendarInterval
           case e: IllegalArgumentException =>
   ```



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