HyukjinKwon opened a new pull request, #56666: URL: https://github.com/apache/spark/pull/56666
### What changes were proposed in this pull request? `DateExpressionsSuite` "TruncTimestamp of Long.MinValue overflows with ArithmeticException" fails under JDK 25 in codegen mode. The overflow `ArithmeticException` IS thrown (from `Math.*Exact` in `DateTimeUtils.truncTimestamp`), but under JDK 25 the JIT "hot-throw" optimization can deliver it with a `null` message (a pre-allocated exception), whereas the interpreter reports `"long overflow"`. The old assertion checked the message and so failed on JDK 25 (`Expected ... but null error message found`). This makes the test assert the exception TYPE (`ArithmeticException`) across both the interpreted and codegen paths and tolerate a `null` message (the JDK 25 hot-throw case), which is not part of the API contract. See SPARK-55714 / SPARK-55755 / JDK-8367990. ### Why are the changes needed? The scheduled `Build / Java 25` (and `maven_java25`) builds fail on this catalyst test. It is a JDK-version-dependent exception-message difference, not a Spark logic change: the exception is still thrown, only its message varies. ### Does this PR introduce _any_ user-facing change? No. Test-only change. ### How was this patch tested? Validated under real JDK 25 codegen: the catalyst job (`api, catalyst, hive-thriftserver`) passed in the combined Build/Java25 fork run that includes this fix (alongside the sibling log4j 2.26.0 and try_arithmetic golden fixes): https://github.com/HyukjinKwon/spark/actions/runs/27943439418 ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) -- 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]
