tustvold commented on code in PR #3778:
URL: https://github.com/apache/arrow-rs/pull/3778#discussion_r1120672808


##########
arrow-arith/src/boolean.rs:
##########
@@ -425,14 +420,14 @@ pub fn is_null(input: &dyn Array) -> Result<BooleanArray, 
ArrowError> {
 pub fn is_not_null(input: &dyn Array) -> Result<BooleanArray, ArrowError> {
     let len = input.len();
 
-    let output = match input.data_ref().null_buffer() {
+    let output = match input.data_ref().nulls() {
         None => {
             let len_bytes = ceil(len, 8);
             MutableBuffer::new(len_bytes)
                 .with_bitset(len_bytes, true)
                 .into()
         }
-        Some(buffer) => buffer.bit_slice(input.offset(), len),
+        Some(nulls) => nulls.inner().sliced(),

Review Comment:
   Eventually the use of a sliceable NullBuffer will allow us to not need to 
slice the buffer, and instead just preserve the offset



##########
arrow-arith/src/boolean.rs:
##########
@@ -425,14 +420,14 @@ pub fn is_null(input: &dyn Array) -> Result<BooleanArray, 
ArrowError> {
 pub fn is_not_null(input: &dyn Array) -> Result<BooleanArray, ArrowError> {
     let len = input.len();
 
-    let output = match input.data_ref().null_buffer() {
+    let output = match input.data_ref().nulls() {
         None => {
             let len_bytes = ceil(len, 8);
             MutableBuffer::new(len_bytes)
                 .with_bitset(len_bytes, true)
                 .into()
         }
-        Some(buffer) => buffer.bit_slice(input.offset(), len),
+        Some(nulls) => nulls.inner().sliced(),

Review Comment:
   Eventually the use of a sliceable NullBuffer will allow us to not need to 
slice the buffer, and instead just preserve the offset, but I wanted to keep 
the changes in this PR down



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