rommelDB commented on a change in pull request #10898:
URL: https://github.com/apache/arrow/pull/10898#discussion_r687250068



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -1589,6 +1636,19 @@ const FunctionDoc log1p_checked_doc{
      "-inf or NaN."),
     {"x"}};
 
+const FunctionDoc logb_doc{
+    "Compute log of x to base b of arguments element-wise",
+    ("Values <= -1 return -inf or NaN. Null values return null.\n"

Review comment:
       Fixed.

##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
##########
@@ -2001,6 +2020,45 @@ TYPED_TEST(TestUnaryArithmeticIntegral, Log) {
   }
 }
 
+TYPED_TEST(TestBinaryArithmeticIntegral, Log) {
+  // Integer arguments promoted to double, sanity check here
+  this->AssertBinop(Logb, "[1, 10, null]", "[10, 10, null]",
+                    ArrayFromJSON(float64(), "[0, 1, null]"));
+  this->AssertBinop(Logb, "[1, 2, null]", "[2, 2, null]",
+                    ArrayFromJSON(float64(), "[0, 1, null]"));
+  this->AssertBinop(Logb, "[10, 100, null]", this->MakeScalar(10),
+                    ArrayFromJSON(float64(), "[1, 2, null]"));
+}
+
+TYPED_TEST(TestBinaryArithmeticFloating, Log) {
+  // Integer arguments promoted to double, sanity check here

Review comment:
       You are right.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to