viirya commented on code in PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749#discussion_r973207615


##########
arrow/src/compute/kernels/arity.rs:
##########
@@ -292,19 +292,16 @@ where
         .map(|x| len - x.count_set_bits())
         .unwrap_or_default();
 
-    let mut buffer = BufferBuilder::<O::Native>::new(len);
-    buffer.append_n_zeroed(len);
-    let slice = buffer.as_slice_mut();
+    let values = a.values().iter().zip(b.values()).map(|(l, r)| op(*l, *r));
 
-    try_for_each_valid_idx(len, 0, null_count, null_buffer.as_deref(), |idx| {

Review Comment:
   `try_unary` also uses `try_for_each_valid_idx`, same trick also applies 
there?



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