emkornfield commented on code in PR #1569:
URL: https://github.com/apache/iceberg-rust/pull/1569#discussion_r2337466489
##########
crates/iceberg/src/spec/values.rs:
##########
@@ -1196,14 +1199,92 @@ impl Datum {
(PrimitiveLiteral::Int(val), _, PrimitiveType::Int) =>
Ok(Datum::int(*val)),
(PrimitiveLiteral::Int(val), _, PrimitiveType::Date) =>
Ok(Datum::date(*val)),
(PrimitiveLiteral::Int(val), _, PrimitiveType::Long) =>
Ok(Datum::long(*val)),
+ (PrimitiveLiteral::Int(val), PrimitiveType::Date,
PrimitiveType::Timestamp) => {
+ Ok(Datum::timestamp_micros(*val as i64 *
MICROS_PER_DAY))
Review Comment:
nit: Do a safe multiply 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: [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]