wesm commented on a change in pull request #7461:
URL: https://github.com/apache/arrow/pull/7461#discussion_r441605587



##########
File path: cpp/src/arrow/compute/kernels/scalar_compare.cc
##########
@@ -54,72 +56,106 @@ struct GreaterEqual {
   }
 };
 
-struct Less {
-  template <typename T>
-  static constexpr bool Call(KernelContext*, const T& left, const T& right) {
-    return left < right;
-  }
-};
-
-struct LessEqual {
-  template <typename T>
-  static constexpr bool Call(KernelContext*, const T& left, const T& right) {
-    return left <= right;
-  }
-};
+// Implement Greater, GreaterEqual by flipping arguments to Less, LessEqual
 
-template <typename InType, typename Op>
-void AddCompare(const std::shared_ptr<DataType>& ty, ScalarFunction* func) {
-  ArrayKernelExec exec = codegen::ScalarBinaryEqualTypes<BooleanType, InType, 
Op>::Exec;
-  DCHECK_OK(func->AddKernel({ty, ty}, boolean(), exec));
+template <typename Op>

Review comment:
       Generator and Op are not the same thing in codegen_internal.h -- I agree 
with giving consistent names to isomorphic concepts, though. 




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