sdd commented on code in PR #665:
URL: https://github.com/apache/iceberg-rust/pull/665#discussion_r1811988261
##########
crates/iceberg/src/spec/values.rs:
##########
@@ -449,7 +456,30 @@ impl Datum {
PrimitiveLiteral::String(val) => ByteBuf::from(val.as_bytes()),
PrimitiveLiteral::UInt128(val) => ByteBuf::from(val.to_be_bytes()),
PrimitiveLiteral::Binary(val) => ByteBuf::from(val.as_slice()),
- PrimitiveLiteral::Int128(_) => todo!(),
+ PrimitiveLiteral::Int128(val) => {
+ let PrimitiveType::Decimal { precision, .. } = self.r#type
else {
+ unreachable!(
Review Comment:
I think you're right @liurenjie1024 . I don't see a way that a malformed
`Datum` could be created anywhere right now but this may not always be true as
the project continues to evolve.
--
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]