MazterQyou commented on code in PR #1836:
URL: https://github.com/apache/arrow-rs/pull/1836#discussion_r894966737
##########
arrow/src/compute/kernels/temporal.rs:
##########
@@ -183,6 +209,34 @@ where
Ok(b.finish())
}
+/// Extracts the quarter of a given temporal array as an array of integers
+pub fn quarter<T>(array: &PrimitiveArray<T>) -> Result<Int32Array>
Review Comment:
Indeed. This is regarding `date_trunc` function though, while `date_part` in
DataFusion, for instance, uses `arrow-rs`'s `temporal`.
FYI I had an attempt to bring `quarter` to `date_part` in DF without adding
it to `arrow-rs` first, but this required a reword of the macro and made things
look weird, while having `quarter` here is a nice addition and makes the same
addition in DF simple and elegant rather than hacky.
--
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]