tustvold commented on code in PR #2636:
URL: https://github.com/apache/arrow-rs/pull/2636#discussion_r961577314
##########
arrow/src/compute/kernels/filter.rs:
##########
@@ -358,92 +336,12 @@ fn filter_array(values: &dyn Array, predicate:
&FilterPredicate) -> Result<Array
IterationStrategy::None => Ok(new_empty_array(values.data_type())),
IterationStrategy::All => Ok(make_array(values.data().slice(0,
predicate.count))),
// actually filter
- _ => match values.data_type() {
+ _ => downcast_primitive_array! {
Review Comment:
Unfortunately rust doesn't support macros in branch position, and so this
was the best I could come up with -
https://github.com/rust-lang/rfcs/issues/2654
--
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]