alamb commented on code in PR #4038:
URL: https://github.com/apache/arrow-rs/pull/4038#discussion_r1167576968


##########
arrow-arith/src/arithmetic.rs:
##########
@@ -3665,4 +3863,540 @@ mod tests {
             "1234567890.0000000000000000000000000000"
         );
     }
+
+    #[test]
+    fn test_timestamp_second_add_interval() {
+        // timestamp second + interval year month
+        let a = TimestampSecondArray::from(vec![1, 2, 3, 4, 5]);
+        let b = IntervalYearMonthArray::from(vec![
+            Some(IntervalYearMonthType::make_value(1, 1)),

Review Comment:
   The reason I was suggesting tests that had different non zero fields (e.g. 
`years` and `month`s in this example) 
   
   e.g.
   ```rust 
               Some(IntervalYearMonthType::make_value(1, 2)),
   ```
   
   Would be to catch errors such as when the year and month fields were mixed 
up in the code. For example, with
   
   ```rust
               Some(IntervalYearMonthType::make_value(1, 1)),
   ```
   
   If the code made a mistake with which field , these tests would still pass.
   
   
   



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