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 2021/12/01 10:28:05 UTC

[GitHub] [arrow] projjal commented on a change in pull request #10743: ARROW-13376: [C++][Gandiva] Implement FACTORIAL Hive function on Gandiva

projjal commented on a change in pull request #10743:
URL: https://github.com/apache/arrow/pull/10743#discussion_r760049556



##########
File path: cpp/src/gandiva/precompiled/extended_math_ops.cc
##########
@@ -226,6 +226,28 @@ gdv_int32 round_int32(gdv_int32 num) { return num; }
 FORCE_INLINE
 gdv_int64 round_int64(gdv_int64 num) { return num; }
 
+#define FACTORIAL(IN_TYPE)                                                          \
+  FORCE_INLINE                                                                      \
+  gdv_int64 factorial_##IN_TYPE(gdv_int64 ctx, gdv_##IN_TYPE value) {               \

Review comment:
       since only limited number of inputs are valid just use a look up table




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