Description
The code below throws an Java exception, see
spark.sql("SET spark.sql.ansi.enabled=true").show()spark.sql("SELECT add_months('5500000-12-31', 10000000)").show()java.lang.ArithmeticException: integer overflow at java.base/java.lang.Math.toIntExact(Math.java:1074) at org.apache.spark.sql.catalyst.util.DateTimeUtils$.localDateToDays(DateTimeUtils.scala:550) at org.apache.spark.sql.catalyst.util.DateTimeUtils$.dateAddMonths(DateTimeUtils.scala:736)
but it should throw Spark's exception w/ an error class.