You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "mzabaluev (via GitHub)" <gi...@apache.org> on 2025/12/17 17:51:07 UTC

Re: [I] SparkDateAdd does not check for overflow [datafusion]

mzabaluev commented on issue #17987:
URL: https://github.com/apache/datafusion/issues/17987#issuecomment-3666497393

   This has apparently been fixed as of datafusion-spark 51.0.0: date_add/date_sub use checked arithmetics.
   
   However, this is not bug-for-bug compatible with Spark (not to be confused with whatever Comet does): the Java code for `DateAdd`/`DateSub` does the unchecked addition/subtraction, which silently wraps around. So the Spark-faithful implementation should rather use `wrapping_add`/`wrapping_sub`.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org