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/01/23 14:42:56 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #9301: ARROW-11357: [Rust]: Fix out-of-bounds reads in `take` and other undefined behavior

jorgecarleitao commented on a change in pull request #9301:
URL: https://github.com/apache/arrow/pull/9301#discussion_r563160450



##########
File path: rust/arrow/src/compute/kernels/take.rs
##########
@@ -1350,20 +1532,32 @@ mod tests {
     }
 
     #[test]
-    #[should_panic(
-        expected = "Array index out of bounds, cannot get item at index 6 from 5 entries"
-    )]
     fn test_take_out_of_bounds() {

Review comment:
       this test was panicking because there was an `unwrap` on `test_take_primitive_arrays`, however, this would not allow to verify whether the panic was observed when `check_bounds: false`.
   
   I changed this test to verify that the result is an error.




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