You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/19 12:34:36 UTC

[GitHub] [arrow] cyb70289 commented on a diff in pull request #12917: ARROW-16223: [C++] Fix decimal reduce scale rounding

cyb70289 commented on code in PR #12917:
URL: https://github.com/apache/arrow/pull/12917#discussion_r853009036


##########
cpp/src/arrow/util/decimal_test.cc:
##########
@@ -1521,6 +1525,10 @@ TEST(Decimal128Test, ReduceScaleAndRound) {
   result = Decimal128("-123750").ReduceScaleBy(2, true);
   ASSERT_OK(result.ToInteger(&out));
   ASSERT_EQ(-1238, out);
+
+  result = Decimal128("-5").ReduceScaleBy(1, true);
+  ASSERT_OK(result.ToInteger(&out));
+  ASSERT_EQ(-1, out);

Review Comment:
   Done



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org