alamb commented on code in PR #8044:
URL: https://github.com/apache/arrow-rs/pull/8044#discussion_r2257539415


##########
parquet-variant/src/variant.rs:
##########
@@ -1149,6 +1149,50 @@ impl From<i64> for Variant<'_, '_> {
     }
 }
 
+impl From<u8> for Variant<'_, '_> {
+    fn from(value: u8) -> Self {
+        // if it fits in i8, use that, otherwise use i16
+        if let Ok(value) = i8::try_from(value) {
+            Variant::Int8(value)
+        } else {
+            Variant::Int16(value as i16)

Review Comment:
   it is a good idea -- done in 
   - https://github.com/apache/arrow-rs/pull/8068



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

Reply via email to