aalkin commented on code in PR #34069:
URL: https://github.com/apache/arrow/pull/34069#discussion_r1098508315


##########
cpp/src/gandiva/function_registry_math_ops.cc:
##########
@@ -62,11 +73,16 @@ namespace gandiva {
 std::vector<NativeFunction> GetMathOpsFunctionRegistry() {
   static std::vector<NativeFunction> math_fn_registry_ = {
       MATH_UNARY_OPS(cbrt, {}), MATH_UNARY_OPS(exp, {}), MATH_UNARY_OPS(log, 
{}),
-      MATH_UNARY_OPS(log10, {}),
+      MATH_UNARY_OPS(log10, {}), MATH_UNARY_OPS(sqrt, {}),
+
+      MATH_UNARY_OPS_FLOAT(sqrtf, {}), MATH_UNARY_OPS_FLOAT(cbrtf, {}),
+      MATH_UNARY_OPS_FLOAT(expf, {}), MATH_UNARY_OPS_FLOAT(logf, {}),
+      MATH_UNARY_OPS_FLOAT(log10f, {}),

Review Comment:
   The reasoning here is that we deal with limited precision data and we want 
to avoid automatic promotion to double from float, which has memory and 
performance implications. Having float-only functions allows us to spot the 
issues where extra precision may be used incorrectly at compilation time.



-- 
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-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to