bkietz commented on a change in pull request #11080:
URL: https://github.com/apache/arrow/pull/11080#discussion_r714197277



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
##########
@@ -1622,61 +1622,80 @@ TEST(TestBinaryDecimalArithmetic, DispatchBest) {
     }
   }
 
-  // decimal, integer
-  for (std::string name : {"add", "subtract", "multiply", "divide"}) {
+  // decimal, decimal -> decimal and decimal, integer -> decimal

Review comment:
       nit: easier to read
   ```suggestion
     // decimal, decimal -> decimal
     // decimal, integer -> decimal
   ```

##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
##########
@@ -1622,61 +1622,80 @@ TEST(TestBinaryDecimalArithmetic, DispatchBest) {
     }
   }
 
-  // decimal, integer
-  for (std::string name : {"add", "subtract", "multiply", "divide"}) {
+  // decimal, decimal -> decimal and decimal, integer -> decimal
+  for (std::string name : {"add", "subtract"}) {
     for (std::string suffix : {"", "_checked"}) {
       name += suffix;
 
       CheckDispatchBest(name, {int64(), decimal128(1, 0)},
-                        {decimal128(1, 0), decimal128(1, 0)});
+                        {decimal128(19, 0), decimal128(1, 0)});
       CheckDispatchBest(name, {decimal128(1, 0), int64()},
-                        {decimal128(1, 0), decimal128(1, 0)});
-    }
-  }
-
-  // decimal, decimal
-  for (std::string name : {"add", "subtract"}) {
-    for (std::string suffix : {"", "_checked"}) {
-      name += suffix;
+                        {decimal128(1, 0), decimal128(19, 0)});
 
       CheckDispatchBest(name, {decimal128(2, 1), decimal128(2, 1)},
-                        {decimal128(3, 1), decimal128(3, 1)});
+                        {decimal128(2, 1), decimal128(2, 1)});
       CheckDispatchBest(name, {decimal256(2, 1), decimal256(2, 1)},
-                        {decimal256(3, 1), decimal256(3, 1)});
+                        {decimal256(2, 1), decimal256(2, 1)});

Review comment:
       This is surprising to me. Could you comment on why the implicit cast is 
no longer necessary?




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