You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/06 14:14:08 UTC

[GitHub] [arrow-rs] jhorstmann opened a new issue #417: Boolean `not` kernel does not take offset of null buffer into account

jhorstmann opened a new issue #417:
URL: https://github.com/apache/arrow-rs/issues/417


   **Describe the bug**
   The boolean not kernel does use `null_buffer.bits.slice(offset)` which takes a byte offset. This leads to wrong results and possible panics if the offset is not equal to 0.
   
   **To Reproduce**
   ```
   let a = BooleanArray::from(vec![None, Some(true), Some(false), None, Some(true)]);
   let a = a.slice(1, 4);
   let a = a.as_any().downcast_ref::<BooleanArray>().unwrap();
   let c = not(&a).unwrap();
   
   let expected = BooleanArray::from(vec![Some(false), Some(true), None, Some(false)]);
   
   assert_eq!(c, expected);
   ```
   
   **Expected behavior**
   The code should not panic and return the correct result by using the `bit_slice` method.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb closed issue #417: Boolean `not` kernel does not take offset of null buffer into account

Posted by GitBox <gi...@apache.org>.
alamb closed issue #417:
URL: https://github.com/apache/arrow-rs/issues/417


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org