tustvold commented on code in PR #4323: URL: https://github.com/apache/arrow-rs/pull/4323#discussion_r1211893203
########## 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(f64::floor(time_array.value(i) as f64 / from_size as f64) as i32); Review Comment: Perhaps we could use https://docs.rs/num/latest/num/trait.Integer.html#tymethod.div_floor or something? -- 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