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/05/12 08:30:28 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #10274: ARROW-12685: [C++][Compute] Add unary absolute value kernel

pitrou commented on a change in pull request #10274:
URL: https://github.com/apache/arrow/pull/10274#discussion_r630827515



##########
File path: cpp/src/arrow/compute/api_scalar.h
##########
@@ -160,6 +160,18 @@ struct ARROW_EXPORT ProjectOptions : public FunctionOptions {
 
 /// @}
 
+/// \brief Get the absolute value of a value. Array values can be of arbitrary
+/// length. If argument is null the result will be null.
+///
+/// \param[in] arg the value transformed
+/// \param[in] options arithmetic options (overflow handling), optional
+/// \param[in] ctx the function execution context, optional
+/// \return the elementwise absolute value

Review comment:
       values?

##########
File path: cpp/src/arrow/compute/api_scalar.cc
##########
@@ -47,6 +47,7 @@ namespace compute {
     return CallFunction(func_name, {arg}, ctx);                                        \
   }
 
+SCALAR_ARITHMETIC_UNARY(AbsoluteValue, "absolute_value", "absolute_value_checked")

Review comment:
       "abs" and "abs_checked" perhaps?




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

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