viirya commented on code in PR #5128:
URL: https://github.com/apache/arrow-rs/pull/5128#discussion_r1406872076


##########
arrow-cast/src/cast.rs:
##########
@@ -2677,7 +2688,17 @@ where
             i256::ZERO
         };
 
-        format!("{}", integers.add_wrapping(adjusted))
+        let integers = if negative {
+            integers.neg_wrapping()
+        } else {
+            integers
+        };
+
+        if negative {
+            format!("{}", integers.sub_wrapping(adjusted))

Review Comment:
   Hmm, I forgot why we did the conversion at first. Maybe we can get rid of 
it. As it is not part of this PR, I will do it later.



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