alamb commented on code in PR #6783:
URL: https://github.com/apache/arrow-datafusion/pull/6783#discussion_r1244365027


##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -284,9 +288,7 @@ fn _date_trunc(
     };
 
     // convert to nanoseconds
-    let Some(nano) = (f)(Some(value * scale))? else {
-        return Ok(None);
-    };
+    let nano = date_trunc_coarse(granularity, scale * value)?;

Review Comment:
   There is no need for a closure, and the function can be called directly 
which I think makes things easier to understand



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

Reply via email to