goldmedal commented on code in PR #12603:
URL: https://github.com/apache/datafusion/pull/12603#discussion_r1772977671


##########
datafusion/functions/src/datetime/date_trunc.rs:
##########
@@ -123,7 +123,9 @@ impl ScalarUDFImpl for DateTruncFunc {
 
     fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
         match &arg_types[1] {
-            Timestamp(Nanosecond, None) | Utf8 | Null => 
Ok(Timestamp(Nanosecond, None)),
+            Timestamp(Nanosecond, None) | Utf8 | DataType::Date32 | Null => {

Review Comment:
   I also tried to support `Date64` but got many type coercion issues between 
`Timestamp` and `Date64`. I think we should handle them in another PR if needed.



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