js8544 commented on code in PR #37060:
URL: https://github.com/apache/arrow/pull/37060#discussion_r1308509558


##########
cpp/src/arrow/compute/kernels/codegen_internal.h:
##########
@@ -455,6 +458,41 @@ static void VisitTwoArrayValuesInline(const ArraySpan& 
arr0, const ArraySpan& ar
                         std::move(visit_null));
 }
 
+template <typename Arg0Type, typename Arg1Type, typename VisitBothNotNull,
+          typename VisitLeftNull, typename VisitRightNull, typename 
VisitBothNull>
+static void VisitTwoArrayValuesInlineAllCases(const ArraySpan& arr0,
+                                              const ArraySpan& arr1,
+                                              VisitBothNotNull&& 
visit_both_not_null,
+                                              VisitLeftNull&& visit_left_null,
+                                              VisitRightNull&& 
visit_right_null,
+                                              VisitBothNull&& visit_both_null) 
{
+  ArrayIterator<Arg0Type> arr0_it(arr0);
+  ArrayIterator<Arg1Type> arr1_it(arr1);
+
+  auto forward_visit_both_not_null = [&](int64_t i) {

Review Comment:
   I think capturing by reference is better here because the lambda won't need 
to create a variable for the func. See https://cppinsights.io/s/690fcf31 for an 
example.



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