liyafan82 commented on a change in pull request #7748:
URL: https://github.com/apache/arrow/pull/7748#discussion_r471348419



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
##########
@@ -492,6 +486,81 @@ TYPED_TEST(TestBinaryArithmeticFloating, Add) {
   this->AssertBinop(Add, "[null, 2.0]", this->MakeNullScalar(), "[null, 
null]");
 }
 
+TYPED_TEST(TestBinaryArithmeticFloating, Div) {
+  for (auto check_overflow : {false, true}) {
+    this->SetOverflowCheck(check_overflow);
+    this->AssertBinop(Divide, "[]", "[]", "[]");
+
+    this->AssertBinop(Divide, "[3.4, 2.6, 6.3]", "[1, 2, 2]", "[3.4, 1.3, 
3.15]");
+
+    this->AssertBinop(Divide, "[1.1, 2.4, 3.5, 4.3, 5.1, 6.8, 7.3]",
+                      "[1.0, 2.0, 0.7, 0.5, 1.7, 2.0, 5.0]",
+                      "[1.1, 1.2, 5.0, 8.6, 3.0, 3.4, 1.46]");

Review comment:
       Thank you for the good suggestion. 
   I have removed some test cases, and made sure the remaining cases cover the 
above items, with one exception: the inifinity comparisons should depend on 
another PR: https://github.com/apache/arrow/pull/7826




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to