AngersZhuuuu opened a new pull request #32281:
URL: https://github.com/apache/spark/pull/32281


   ### What changes were proposed in this pull request?
   IntervalUtils.fromYearMonthString should handle Int.MinValue months correctly
   In current logic just use `Math.addExact(Math.multiplyExact(years, 12), 
months)` to calculate  negative total months will overflow when actual total 
months is Int.MinValue, this pr fix this bug.
   
   
   ### Why are the changes needed?
   IntervalUtils.fromYearMonthString should handle Int.MinValue months correctly
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Added UT
   


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

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