liyafan82 commented on a change in pull request #8036: URL: https://github.com/apache/arrow/pull/8036#discussion_r478231393
########## File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc ########## @@ -165,12 +166,17 @@ class TestBinaryArithmetic : public TestBase { void ValidateAndAssertApproxEqual(const std::shared_ptr<Array>& actual, const std::shared_ptr<Array>& expected) { ASSERT_OK(actual->ValidateFull()); - AssertArraysApproxEqual(*expected, *actual, /*verbose=*/true); + AssertArraysApproxEqual(*expected, *actual, /*verbose=*/true, equal_options_); } void SetOverflowCheck(bool value = true) { options_.check_overflow = value; } + void SetNansEqual(bool value = false) { Review comment: Sounds reasonable. I have made the default value to true, and provided a test case for NaN in the input. ---------------------------------------------------------------- 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: us...@infra.apache.org