vinodkc commented on code in PR #53172:
URL: https://github.com/apache/spark/pull/53172#discussion_r2553299774


##########
sql/core/src/test/resources/sql-tests/inputs/interval.sql:
##########
@@ -385,3 +385,8 @@ SELECT width_bucket(INTERVAL '0' YEAR, INTERVAL '0' YEAR, 
INTERVAL '10' YEAR, 10
 SELECT width_bucket(INTERVAL '-1' YEAR, INTERVAL -'1-2' YEAR TO MONTH, 
INTERVAL '1-2' YEAR TO MONTH, 10);
 SELECT width_bucket(INTERVAL '0' DAY, INTERVAL '0' DAY, INTERVAL '10' DAY, 10);
 SELECT width_bucket(INTERVAL '-59' MINUTE, INTERVAL -'1 01' DAY TO HOUR, 
INTERVAL '1 2:3:4.001' DAY TO SECOND, 10);
+
+-- interval overflow with large day values (SPARK-50072)
+-- This should throw INTERVAL_ARITHMETIC_OVERFLOW error
+SELECT interval 106751991 day 4 hour 0 minute 54.776 second;

Review Comment:
   Generate golden files using 
   `SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/Test/testOnly 
*SQLQueryTestSuite -- -z interval.sql"`
   and add this `sql.out` files



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