Omega359 commented on code in PR #19341:
URL: https://github.com/apache/datafusion/pull/19341#discussion_r2637885648


##########
datafusion/functions/src/datetime/date_bin.rs:
##########
@@ -146,7 +162,44 @@ impl DateBinFunc {
                     DataType::Interval(DayTime),
                     Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
                 ]),
-            ]
+            ];
+
+            match array_type {
+                Second | Millisecond => {
+                    v.append(&mut vec![
+                        Exact(vec![
+                            DataType::Interval(MonthDayNano),
+                            Time32(array_type),
+                            Time32(array_type),

Review Comment:
   I took a look at this and it's a bit more than just the timeunit - it's the 
type. For time32 there is just two timeunits supported - Second and 
Millisecond. For Time64 it's Microsecond and Nanosecond. 
   
   Supporting a mix of those I think would be unnecessary. Forcing a single 
type (`Time64(Nanosecond)`) might work but I don't see it as beneficial really. 
Are you of a different opinion?



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