mzabaluev opened a new pull request, #19377:
URL: https://github.com/apache/datafusion/pull/19377

   ## Which issue does this PR close?
   
   - Addresses 
[#17987(comment)](https://github.com/apache/datafusion/issues/17987#issuecomment-3666497393).
   
   ## Rationale for this change
   
   In Spark, `date_add` and `date_sub` functions do not raise an error when the 
addition or subtraction overflows 32-bit integer, regardless of whether the 
ANSI evaluation mode is in effect.
   
   ## What changes are included in this PR?
   
   Changed the implementations to use `wrapping_add` and `wrapping_sub`.
   
   ## Are these changes tested?
   
   Updated `date_add.slt` to expect overflowed results rather than the errors.
   
   ## Are there any user-facing changes?
   
   The functions behave more like Spark, even if Spark is doing the wrong thing.


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