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


##########
arrow/src/util/decimal.rs:
##########
@@ -119,15 +165,44 @@ pub trait BasicDecimal: PartialOrd + Ord + PartialEq + Eq 
{
     }
 }
 
+impl<const BYTE_WIDTH: usize> PartialOrd for BasicDecimal<BYTE_WIDTH> {
+    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {

Review Comment:
   For compiler, the difference between `value` and `type` is that `value` 
cannot be known at compile time, they can only be known at runtime (by 
hardware).
   However, `type` is known at compile time. But `type` only exists at compile 
time.
   
   For `const value`, the thing goes to be interesting. Because 
   1. constant value can be known by compiler at compile time
   2. constant value will exist at both compile time and runtime.
   
   That why in Rust `const_generic` is possible.
   @viirya 



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