tustvold commented on code in PR #1836:
URL: https://github.com/apache/arrow-rs/pull/1836#discussion_r894712182


##########
arrow/src/compute/kernels/temporal.rs:
##########
@@ -389,6 +443,48 @@ mod tests {
         assert_eq!(2012, b.value(2));
     }
 
+    #[test]
+    fn test_temporal_array_date64_quarter() {
+        //1514764800000 -> 2018-01-01
+        //1566275025000 -> 2019-08-20

Review Comment:
   Is it worth checking a month on the leading edge, e.g. first day of April



##########
arrow/src/compute/kernels/temporal.rs:
##########
@@ -112,6 +112,32 @@ macro_rules! return_compute_error_with {
     };
 }
 
+trait ChronoDateQuarter {
+    fn quarter(&self) -> u32;
+
+    fn quarter0(&self) -> u32;

Review Comment:
   Is there a particular reason to have quarter0?



##########
arrow/src/compute/kernels/temporal.rs:
##########
@@ -112,6 +112,32 @@ macro_rules! return_compute_error_with {
     };
 }
 
+trait ChronoDateQuarter {
+    fn quarter(&self) -> u32;

Review Comment:
   ```suggestion
       /// Returns a value from `1..=4` indicating the quarter this date falls 
into
       fn quarter(&self) -> u32;
   ```



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