HyukjinKwon opened a new pull request, #56665:
URL: https://github.com/apache/spark/pull/56665

   ### What changes were proposed in this pull request?
   
   Make `DateExpressionsSuite."TruncTimestamp of Long.MinValue overflows with 
ArithmeticException"`
   tolerant of a null exception message under JDK 25.
   
   ### Why are the changes needed?
   
   On the branch-4.2 `Build (branch-4.2, Scala 2.13, JDK 25)` daily build, this 
test failed. The
   overflow from `Math.*Exact` in `TruncTimestamp` does throw a raw 
`java.lang.ArithmeticException`, but
   on JDK 25 the JIT "hot throw" optimization (OmitStackTraceInFastThrow, 
JDK-8367990) can throw it with a
   `null` message in codegen mode, while the interpreter reports `"long 
overflow"`. The original
   assertion required a non-null message, so it failed on JDK 25.
   
   The fix evaluates the expression directly under both `NO_CODEGEN` and 
`CODEGEN_ONLY` modes, asserts the
   exception is an `ArithmeticException`, and tolerates a null-or-"overflow" 
message (matching the existing
   convention used by the SubtractTimestamps / TimestampAddInterval overflow 
checks in the same suite). The
   engine is correct (it does throw on overflow); this is a test-only change.
   
   ### Does this PR introduce any user-facing change?
   
   No. Test-only.
   
   ### How was this patch tested?
   
   **Validated GREEN on the fork:** the `Build (branch-4.2, Scala 2.13, JDK 
25)` build is green with this
   fix, including the `api, catalyst, hive-thriftserver` job where 
`TruncTimestamp` runs:
   https://github.com/HyukjinKwon/spark/actions/runs/27942948687
   
   The second commit is a clearly-marked `[DO NOT MERGE]` CI trigger edit for 
fork validation and should be
   dropped before merge.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Yes. Generated with Claude Code (Anthropic) under the direction of the 
repository owner.


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