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


##########
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:
   Maybe `[&]` should be replaced by `[visit_both_not_null = 
std::move(visit_both_not_null)]` so the r-value parameters are moved into the 
local lambdas. As they are not shared, they can be moved.



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