Jefffrey commented on code in PR #12318:
URL: https://github.com/apache/arrow-rs/pull/12318#discussion_r4640437126


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -1749,6 +1749,12 @@ pub fn cast_with_options(
             cast_with_options(&array, to_type, cast_options)
         }
 
+        // reinterpret Int64 without going through ArrayData

Review Comment:
   comment no longer accurate, same for below



##########
arrow-cast/tests/cast/interval.rs:
##########
@@ -338,6 +338,13 @@ fn test_cast_between_durations_and_numerics() {
     assert_eq!(802034103, c.value(1));
     assert_eq!(10241096, c.value(2));
     assert!(c.is_null(3));
+
+    let array = Int64Array::from(vec![Some(i64::MAX), Some(802034103), None]);
+    let b = cast(&array, &DataType::Duration(TimeUnit::Second)).unwrap();
+    let c = b.as_any().downcast_ref::<DurationSecondArray>().unwrap();

Review Comment:
   ```suggestion
       let c = b.as_primitive::<DurationSecondType>();
   ```



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