liurenjie1024 commented on code in PR #1146:
URL: https://github.com/apache/iceberg-rust/pull/1146#discussion_r2020345739


##########
crates/iceberg/src/transform/temporal.rs:
##########
@@ -337,12 +337,12 @@ pub struct Hour;
 impl Hour {
     #[inline]
     fn hour_timestamp_micro(v: i64) -> i32 {
-        (v / MICROSECONDS_PER_HOUR) as i32
+        (v as f64 / MICROSECONDS_PER_HOUR).floor() as i32

Review Comment:
   Using unstable api means we need to use unstable rust sdk, what's worse it 
requires all of our downstream users to use unstable rust sdk, which is anti 
pattern for a rust library.
   Unstable rust sdk contains experimental apis, but there is no guarantee that 
those apis will be still there when a stable version is released.
   See [doc about rust 
channels](https://rust-lang.github.io/rustup/concepts/channels.html)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to