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/10/25 09:29:57 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #14434: ARROW-15538: [C++] Expanding coverage of math functions from Substrait to Acero

pitrou commented on code in PR #14434:
URL: https://github.com/apache/arrow/pull/14434#discussion_r1004234377


##########
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:
   @drabastomek {{Decimal128::Exp}} doesn't exist, so this definition wouldn't compile.



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