viirya commented on code in PR #6396: URL: https://github.com/apache/arrow-rs/pull/6396#discussion_r1764467841
########## arrow-arith/src/arity.rs: ########## @@ -313,7 +313,7 @@ where )))); } - let nulls = NullBuffer::union(a.logical_nulls().as_ref(), b.logical_nulls().as_ref()); Review Comment: Hmm, for `binary_mut`, it is okay to defer the computation of union of two null buffers. It is because that we don't need to own the null buffers before invoking `op` on the two arrays. Since the null buffer is not changed on the builder, we can compute the union after finishing the builder. So for `binary_mut`, we can avoid copying null buffer. But for `try_binary_mut`, because we need to get the union of two null buffers before invoking `op` on the two arrays, we still need to copy it as this PR does. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org