waitingkuo commented on code in PR #2996:
URL: https://github.com/apache/arrow-rs/pull/2996#discussion_r1011359357


##########
arrow/src/compute/kernels/temporal.rs:
##########
@@ -1313,4 +1331,19 @@ mod tests {
         let expected = Int32Array::from(vec![Some(1), Some(8), Some(8), 
Some(1), None]);
         assert_eq!(expected, b);
     }
+
+    #[test]
+    fn test_temporal_array_date64_nanosecond() {
+        // new Date(1667328721453)
+        // Tue Nov 01 2022 11:52:01 GMT-0700 (Pacific Daylight Time)
+        //
+        // new Date(1667328721453).getMilliseconds()
+        // 453
+
+        let a: PrimitiveArray<Date64Type> = vec![None, 
Some(1667328721453)].into();
+
+        let b = nanosecond(&a).unwrap();
+        assert!(!b.is_valid(0));
+        assert_eq!(453_000_000, b.value(1));
+    }
 }

Review Comment:
   👍 
   i think we could add another test case for test `nanosecond()` for Timestamp 
data type  like `TimestampSecondArray`



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