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


##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -219,42 +219,49 @@ fn quarter_month(date: &NaiveDateTime) -> u32 {
 /// account that some granularities are not uniform durations of time
 /// (e.g. months are not always the same lengths, leap seconds, etc)
 fn date_trunc_coarse(granularity: &str, value: i64) -> Result<i64> {
-    if granularity == "millisecond" || granularity == "microsecond" {

Review Comment:
   this special case was what is confusing. I removed this one and inlined the 
`with_nanosecond(0)` call for all the other cases



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