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 2020/10/08 12:21:32 UTC

[GitHub] [arrow] sagnikc-dremio commented on a change in pull request #8398: ARROW-10234: [C++][Gandiva] Fix logic of round() for floats/decimals in Gandiva

sagnikc-dremio commented on a change in pull request #8398:
URL: https://github.com/apache/arrow/pull/8398#discussion_r501676101



##########
File path: cpp/src/gandiva/precompiled/extended_math_ops_test.cc
##########
@@ -93,6 +93,9 @@ TEST(TestExtendedMathOps, TestRoundDecimal) {
   EXPECT_FLOAT_EQ(round_float32_int32(-1234.4567f, 3), -1234.457f);
   EXPECT_FLOAT_EQ(round_float32_int32(-1234.4567f, -3), -1000);
   EXPECT_FLOAT_EQ(round_float32_int32(1234.4567f, 0), 1234);
+  EXPECT_FLOAT_EQ(round_float32_int32(static_cast<float>(1.55), 1), 1.5f);

Review comment:
       Yes, I have verified that these tests fail without this change.




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

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