parthchandra commented on code in PR #4323:
URL: https://github.com/apache/arrow-rs/pull/4323#discussion_r1212340953


##########
arrow-cast/src/cast.rs:
##########
@@ -1853,7 +1853,7 @@ pub fn cast_with_options(
                 if time_array.is_null(i) {
                     b.append_null();
                 } else {
-                    b.append_value((time_array.value(i) / from_size) as i32);
+                    
b.append_value(num::integer::div_floor::<i64>(time_array.value(i), from_size) 
as i32);

Review Comment:
   @tustvold you'er right. My ide led me to the BigInt implementation of 
div_floor which is necessarily more complex, but not relevant here. 



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to