lidavidm commented on a change in pull request #10349:
URL: https://github.com/apache/arrow/pull/10349#discussion_r692372557
##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
##########
@@ -150,18 +149,32 @@ class TestUnaryArithmetic : public TestBase {
AssertArraysApproxEqual(*expected, *actual, /*verbose=*/true,
equal_options_);
}
- void SetOverflowCheck(bool value = true) { options_.check_overflow = value; }
-
void SetNansEqual(bool value = true) {
this->equal_options_ = equal_options_.nans_equal(value);
}
- ArithmeticOptions options_ = ArithmeticOptions();
+ Options options_ = Options();
EqualOptions equal_options_ = EqualOptions::Defaults();
};
+template <typename T, typename Options>
Review comment:
Right, I just don't see why you couldn't have them all inherit from the
Base variant.
##########
File path: cpp/src/arrow/compute/api_scalar.h
##########
@@ -49,10 +49,44 @@ class ARROW_EXPORT ElementWiseAggregateOptions : public
FunctionOptions {
explicit ElementWiseAggregateOptions(bool skip_nulls = true);
constexpr static char const kTypeName[] = "ElementWiseAggregateOptions";
static ElementWiseAggregateOptions Defaults() { return
ElementWiseAggregateOptions{}; }
-
bool skip_nulls;
};
+enum class RoundMode {
Review comment:
Awesome, thanks.
--
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]