jonathanc-n commented on code in PR #1150: URL: https://github.com/apache/iceberg-rust/pull/1150#discussion_r2023707366
########## crates/iceberg/src/transform/bucket.rs: ########## @@ -888,4 +904,66 @@ mod test { Datum::int(32) ); } + + #[test] + fn test_timestamptz_literal() { + let bucket = Bucket::new(100); + assert_eq!( + bucket + .transform_literal(&Datum::timestamptz_micros(1510871468000000)) + .unwrap() + .unwrap(), + Datum::int(7) + ); + } + + #[test] + fn test_timestamp_ns_literal() { + let bucket = Bucket::new(100); + let ns_value = 1510871468000000i64 * 1000; + assert_eq!( + bucket + .transform_literal(&Datum::timestamp_nanos(ns_value)) + .unwrap() + .unwrap(), + Datum::int(79) Review Comment: Yes I applied the conversion to the `transform_literal` as well -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org