stuartcarnie commented on code in PR #5698:
URL: https://github.com/apache/arrow-datafusion/pull/5698#discussion_r1146768915


##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -354,6 +354,24 @@ fn date_bin_impl(
                 }
             }
         }
+        ColumnarValue::Scalar(ScalarValue::IntervalMonthDayNano(Some(v))) => {
+            let (months, days, nanos) = IntervalMonthDayNanoType::to_parts(*v);
+            if months != 0 {
+                return Err(DataFusionError::NotImplemented(
+                    "DATE_BIN stride does not support month 
intervals".to_string(),

Review Comment:
   Correct.
   
   We'll need to round to the first of the month, and those nanosecond 
intervals are not regular. We'll probably be best served using the `chrono` 
package to handle month and year rounding.



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