You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/23 14:16:03 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5698: feat: `date_bin` supports MonthDayNano, microsecond and nanosecond units

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


##########
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:
   👍  this is because months are not a fixed number of nanoseconds, right?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org