mihaibudiu commented on code in PR #4845: URL: https://github.com/apache/calcite/pull/4845#discussion_r2989013264
########## core/src/test/resources/sql/scalar.iq: ########## @@ -18,6 +18,32 @@ !set outputformat mysql !use scott +# 5 test cases for [CALCITE-7443] Incorrect simplification for large interval +SELECT -(INTERVAL -2147483648 months); +java.lang.ArithmeticException: integer overflow + +!error + +SELECT INTERVAL 2147483647 years; +java.lang.ArithmeticException: integer overflow + +!error + +SELECT -(INTERVAL -9223372036854775.808 SECONDS); +java.lang.ArithmeticException: long overflow + +!error + +SELECT INTERVAL 3000000 months * 1000; +java.lang.ArithmeticException: integer overflow + +!error + +SELECT INTERVAL 3000000 months / .0001; +java.lang.ArithmeticException: Overflow Review Comment: The error message is not informative, it is the innermost exception, which is not very helpful. But this is the best we can do now. -- 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]
