GeetKrishna commented on code in PR #1617:
URL: https://github.com/apache/iceberg-rust/pull/1617#discussion_r2294446786
##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -378,7 +378,24 @@ impl ArrowSchemaVisitor for ArrowSchemaConverter {
DataType::Int8 | DataType::Int16 | DataType::Int32 => {
Ok(Type::Primitive(PrimitiveType::Int))
}
+ // Cast unsigned types based on bit width (following Python
implementation)
+ DataType::UInt8 | DataType::UInt16 | DataType::UInt32 => {
+ // Cast to next larger signed type to prevent overflow
+ let bit_width = p.primitive_width().unwrap_or(0) * 8; //
Convert bytes to bits
Review Comment:
Yes, will make this logic simple
--
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]