jorisvandenbossche commented on a change in pull request #9841:
URL: https://github.com/apache/arrow/pull/9841#discussion_r612157632



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -359,6 +425,18 @@ const FunctionDoc div_checked_doc{
      "integer overflow is encountered."),
     {"dividend", "divisor"}};
 
+const FunctionDoc pow_doc{
+    "Raise arguments to power element-wise",
+    ("Integer to negative integer power returns an error. However, integer 
overflow\n"
+     "wraps around. Floating poing power follows std::pow() behaviour.\n"),

Review comment:
       ```suggestion
        "wraps around. Floating point power follows std::pow() behaviour.\n"),
   ```

##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -359,6 +425,18 @@ const FunctionDoc div_checked_doc{
      "integer overflow is encountered."),
     {"dividend", "divisor"}};
 
+const FunctionDoc pow_doc{
+    "Raise arguments to power element-wise",
+    ("Integer to negative integer power returns an error. However, integer 
overflow\n"
+     "wraps around. Floating poing power follows std::pow() behaviour.\n"),

Review comment:
       I think ideally the behaviour is actually spelled out, instead of 
referring to `std::pow()`. Those docs are also used for python docstrings, and 
the typical python user will not even know what `std::pow()` is referring to.

##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -359,6 +425,18 @@ const FunctionDoc div_checked_doc{
      "integer overflow is encountered."),
     {"dividend", "divisor"}};
 
+const FunctionDoc pow_doc{
+    "Raise arguments to power element-wise",
+    ("Integer to negative integer power returns an error. However, integer 
overflow\n"
+     "wraps around. Floating poing power follows std::pow() behaviour.\n"),

Review comment:
       And I would maybe also add the "If either base or exponent is null the 
result will be null."




-- 
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:
[email protected]


Reply via email to