Toby1009 commented on code in PR #25815:
URL: https://github.com/apache/datafusion/pull/25815#discussion_r4128921342


##########
datafusion/sqllogictest/test_files/datetime/timestamps.slt:
##########
@@ -1792,9 +1817,112 @@ FROM (
 )
 ORDER BY b ASC NULLS LAST
 ----
+1653-02-10T06:13:20
 1970-01-01T00:00:00
-NULL
-NULL
+2286-11-20T17:46:40
+
+# A negative month stride can move a bin past its source, so date_bin keeps

Review Comment:
   @mhilton I find the idea of treating the interval as a bin width and 
ignoring its sign interesting. I'd lean slightly toward requiring a strictly 
positive interval and returning an error for negative values, though.
   
   A positive interval already handles timestamps before the origin, so 
negative values aren't needed for that case. Automatically taking `abs` could 
hide an accidentally negative input; an error would help callers catch it 
early. Callers who intentionally want to ignore the sign could do so explicitly 
before constructing the interval.



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