andygrove commented on code in PR #18013:
URL: https://github.com/apache/datafusion/pull/18013#discussion_r2421948596


##########
datafusion/sqllogictest/test_files/spark/datetime/date_add.slt:
##########
@@ -45,6 +45,24 @@ SELECT date_sub('2016-07-30'::date, 0::int);
 ----
 2016-07-30
 
+query error DataFusion error: Arrow error: Arithmetic overflow:
+SELECT date_add('2016-07-30'::date, 2147483647::int);
+
+query D
+SELECT date_sub('2016-07-30'::date, 2147483647::int);
+----
+ERROR: Cast error: Failed to convert -2147466635 to temporal for Date32

Review Comment:
   No. This error is unrelated to the changes in this PR, but I thought it was 
good to add the test.
   
   I was expecting to see an overflow though. I will try and track down the 
root cause.



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