viirya commented on code in PR #6396:
URL: https://github.com/apache/arrow-rs/pull/6396#discussion_r1762071146
##########
arrow-arith/src/arity.rs:
##########
@@ -435,6 +436,22 @@ where
}
}
+/// Computes the union of the nulls in two optional [`NullBuffer`] which
+/// is not shared with the input buffers.
+///
+/// The union of the nulls is the same as `NullBuffer::union(lhs, rhs)` but
+/// it does not increase the reference count of the null buffer.
+fn create_union_null_buffer(
+ lhs: Option<&NullBuffer>,
+ rhs: Option<&NullBuffer>,
+) -> Option<NullBuffer> {
+ match (lhs, rhs) {
+ (Some(lhs), Some(rhs)) => Some(NullBuffer::new(lhs.inner() &
rhs.inner())),
+ (Some(n), None) | (None, Some(n)) => Some(NullBuffer::new(n.inner() &
n.inner())),
Review Comment:
Yes. Previously it did a clone that shares the underlying buffer.
--
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]