Omega359 commented on code in PR #19460:
URL: https://github.com/apache/datafusion/pull/19460#discussion_r2643470845
##########
datafusion/sqllogictest/test_files/datetime/arith_time_interval.slt:
##########
@@ -0,0 +1,27 @@
+# time + interval → time
+# Add an interval to a time
+# time '01:00' + interval '3 hours' → 04:00:00
+
+query ?
+SELECT '01:00'::time + interval '3 hours'
+----
+4 hours
+
+query T
+SELECT arrow_typeof('01:00'::time + interval '3 hours')
+----
+Interval(MonthDayNano)
+
+# time - interval → time
+# Subtract an interval from a time
+# time '05:00' - interval '2 hours' → 03:00:00
+
+query ?
+SELECT '05:00'::time - interval '2 hours'
+----
+3 hours
Review Comment:
The comment came from @pepijnve when he created the .slt files from the
postgres docs. There is a few cases where arrow-rs returns results different
than postgresql and this seems to be one of them. I'll add a note about it in
the file.
--
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]