drabastomek commented on code in PR #14434:
URL: https://github.com/apache/arrow/pull/14434#discussion_r1008259756
##########
cpp/src/arrow/compute/kernels/base_arithmetic_internal.h:
##########
@@ -485,6 +485,22 @@ struct NegateChecked {
}
};
+struct Exp {
+ template <typename T, typename Arg>
+ static constexpr enable_if_floating_value<Arg, T> Call(KernelContext*, Arg
exp,
+ Status*) {
+ static_assert(std::is_same<T, Arg>::value, "");
+ return std::exp(exp);
+ }
+
+ template <typename T, typename Arg>
+ static constexpr enable_if_decimal_value<Arg, T> Call(KernelContext*, Arg
exp,
+ Status*) {
+ static_assert(std::is_same<T, Arg>::value, "");
+ return exp.Exp();
Review Comment:
Ah... I see. Ok, but the Substrait still can call Acero with a decimal
value. I understand it'd be converted to float first to do the `Exp` but would
we rather error on this or keep it? I'm happy to remove this and the relevant
test just thinking out loud.
--
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]