stevomitric commented on code in PR #60134: URL: https://github.com/apache/spark/pull/60134#discussion_r4573554974
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala: ########## @@ -3779,11 +3779,12 @@ case class DateDiff(endDate: Expression, startDate: Expression) override def dataType: DataType = IntegerType Review Comment: Under `spark.sql.legacy.timeParserPolicy=LEGACY`, toSQLValue(..., DateType) goes through the legacy formatter, which rebases Gregorian to Julian days. For dates within ~44k days of Int.MinValue that overflows, so building this error throws a raw ArithmeticException (instead of DATETIME_OVERFLOW) - could you check this please? -- 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]
