cht42 commented on code in PR #19711:
URL: https://github.com/apache/datafusion/pull/19711#discussion_r2678418948


##########
datafusion/sqllogictest/test_files/spark/datetime/add_months.slt:
##########
@@ -15,13 +15,38 @@
 # specific language governing permissions and limitations
 # under the License.
 

Review Comment:
   saprk will error with `ARITHMETIC_OVERFLOW`. I tried adding the following 
test case `SELECT add_months('2016-07-30'::date, 2147483647::int);` and im 
getting `External error: task 35 panicked with message "`NaiveDate + Months` 
out of range"`. So in a way we have the same behavior as spark but its not 
testable ?



##########
datafusion/sqllogictest/test_files/spark/datetime/date_add.slt:
##########
@@ -51,20 +51,15 @@ SELECT date_add('2016-07-30'::date, 2147483647::int)::int;
 -2147466637
 
 query I
-SELECT date_sub('1969-01-01'::date, 2147483647::int)::int;
+SELECT date_add('1969-01-01'::date, 2147483647::int)::int;
 ----
-2147483284
+2147483282
 
 query D
 SELECT date_add('2016-07-30'::date, 100000::int);
 ----
 2290-05-15
 
-query D
-SELECT date_sub('2016-07-30'::date, 100000::int);
-----
-1742-10-15

Review Comment:
   updated



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