tustvold commented on code in PR #2383:
URL: https://github.com/apache/arrow-rs/pull/2383#discussion_r941002927


##########
arrow/src/util/decimal.rs:
##########
@@ -41,7 +71,11 @@ pub trait BasicDecimal: PartialOrd + Ord + PartialEq + Eq {
     /// Safety:
     /// This method doesn't validate if the decimal value represented by the 
bytes
     /// can be fitted into the specified precision.
-    fn try_new_from_bytes(precision: usize, scale: usize, bytes: &[u8]) -> 
Result<Self>
+    pub fn try_new_from_bytes(
+        precision: usize,
+        scale: usize,
+        bytes: &[u8],

Review Comment:
   I think this would help the compiler elude bounds checks, and so might be 
worth doing



##########
arrow/src/util/decimal.rs:
##########
@@ -41,7 +71,11 @@ pub trait BasicDecimal: PartialOrd + Ord + PartialEq + Eq {
     /// Safety:
     /// This method doesn't validate if the decimal value represented by the 
bytes
     /// can be fitted into the specified precision.
-    fn try_new_from_bytes(precision: usize, scale: usize, bytes: &[u8]) -> 
Result<Self>
+    pub fn try_new_from_bytes(
+        precision: usize,
+        scale: usize,
+        bytes: &[u8],

Review Comment:
   I think this would help the compiler elide bounds checks, and so might be 
worth doing



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