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/04/20 10:09:31 UTC

[GitHub] [arrow-rs] tustvold opened a new issue, #1598: Filtering UnionArray Incorrect Handles Runs

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

   **Describe the bug**
   
   The filter kernel attempt to filter runs of contiguous slices, this currently breaks for UnionArrays.
   
   **To Reproduce**
   
   ```
   #[test]
   fn test_filter_run_union_array_dense() {
       let mut builder = UnionBuilder::new_dense(3);
       builder.append::<Int32Type>("A", 1).unwrap();
       builder.append::<Int32Type>("A", 3).unwrap();
       builder.append::<Int32Type>("A", 34).unwrap();
       let array = builder.build().unwrap();
   
       let filter_array = BooleanArray::from(vec![true, true, false]);
       let c = filter(&array, &filter_array).unwrap();
       let filtered = c.as_any().downcast_ref::<UnionArray>().unwrap();
   
       let mut builder = UnionBuilder::new_dense(3);
       builder.append::<Int32Type>("A", 1).unwrap();
       builder.append::<Int32Type>("A", 3).unwrap();
       let expected = builder.build().unwrap();
   
       assert_eq!(filtered.data(), expected.data());
   }
   ```
   
   **Expected behavior**
   
   The above test should pass
   
   **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 #1598: Filtering UnionArray Incorrect Handles Runs

Posted by GitBox <gi...@apache.org>.
alamb closed issue #1598: Filtering UnionArray Incorrect Handles Runs
URL: https://github.com/apache/arrow-rs/issues/1598


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