Weijun-H commented on PR #4020:
URL: https://github.com/apache/arrow-rs/pull/4020#issuecomment-1510298083

   > I think this PR is ready to go. I don't totally understand why [#4020 
(files)](https://github.com/apache/arrow-rs/pull/4020/files#r1167579187) is not 
needed, but the test coverage
   > 
   > ```
   >         let array = vec![i64::MAX];
   >         let casted_array = 
cast_from_duration_to_interval::<DurationMillisecondType>(
   >             array.clone(),
   >             &DEFAULT_CAST_OPTIONS,
   >         )
   >         .unwrap();
   >         assert!(!casted_array.is_valid(0));
   > ```
   > 
   > covers the case I was thinking of so 👍
   > 
   > Thank you @Weijun-H
   
   Because v is `i64` in [#4020 
(files)](https://github.com/apache/arrow-rs/pull/4020/files#r1167579187), 
`checked_mul` will return `None` when overflowing. 


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