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 2022/05/03 11:59:44 UTC

[GitHub] [arrow-rs] HaoYang670 opened a new issue, #1639: Bug (`substring` kernel): The null buffer is not aligned when `offset != 0`

HaoYang670 opened a new issue, #1639:
URL: https://github.com/apache/arrow-rs/issues/1639

   **Describe the bug**
   Track https://github.com/apache/arrow-rs/pull/1633#discussion_r863308866
   We have the bug in `BinaryArray` and `StringArray` in the substring kernel.
   
   **To Reproduce**
   ```rust
       fn offset_fixed_size_binary() -> Result<()> {
           let values = *b"hellotherearrow";
           let offsets: [i32; 4] = [0, 5, 10, 15];
           // set the first and third element to be valid
           let bits_v = [0b101_u8];
   
           let data = ArrayData::builder(DataType::Binary)
               .len(2)
               .add_buffer(Buffer::from_slice_ref(&offsets))
               .add_buffer(Buffer::from_slice_ref(&values))
               .offset(1)
               .null_bit_buffer(Buffer::from(bits_v))
               .build()
               .unwrap();
           // array is `[null, "arrow"]`
           let array = BinaryArray::from(data);
           // result is `[null, "rrow"]`
           let result = substring(&array, 1, None)?;
           let result = result
               .as_any()
               .downcast_ref::<BinaryArray>()
               .unwrap();
           let expected = BinaryArray::from_opt_vec(
               vec![None, Some(b"rrow")],
           );
           assert_eq!(result, &expected);
   
           Ok(())
       }
   ```
   **Expected behavior**
   1. fix the bug
   2. add tests
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow-rs] alamb closed issue #1639: Bug (`substring` kernel): The null buffer is not aligned when `offset != 0`

Posted by GitBox <gi...@apache.org>.
alamb closed issue #1639: Bug (`substring` kernel): The null buffer is not aligned when `offset != 0`
URL: https://github.com/apache/arrow-rs/issues/1639


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] HaoYang670 commented on issue #1639: Bug (`substring` kernel): The null buffer is not aligned when `offset != 0`

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #1639:
URL: https://github.com/apache/arrow-rs/issues/1639#issuecomment-1120325232

   blocked by #1665 


-- 
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-unsubscribe@arrow.apache.org

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