Jefffrey commented on code in PR #10236:
URL: https://github.com/apache/arrow-rs/pull/10236#discussion_r3587700210
##########
arrow-select/src/filter.rs:
##########
@@ -608,6 +622,44 @@ fn filter_array(values: &dyn Array, predicate:
&FilterPredicate) -> Result<Array
}
}
+/// Whether the specialized [`filter_list`] is beneficial for a
`List`/`LargeList`
+/// with the given child data type.
+///
+/// The rule that matches the benchmarks: specialize exactly the children that
+/// [`filter_array`] has a fast typed kernel for *and* which only consume the
+/// predicate's `Slices` (never `filter` directly).
+///
+/// Left on the fallback, for distinct reasons:
+/// - dense `Union`: filtering it requires a per-row, per-type compacting
+/// gather (no contiguous range copy), so the specialized path can only match
+/// the `MutableArrayData` fallback, not beat it.
+/// - `RunEndEncoded`: its kernel reads `predicate.filter` directly, which the
+/// streamed `Slices` predicate does not populate.
+fn filter_list_child_is_fast(child: &DataType) -> bool {
Review Comment:
might be easier to just match on whats not supported instead
##########
arrow/benches/filter_kernels.rs:
##########
Review Comment:
perhaps we should split this into a separate PR so we can use the bot to run
the benches for us
--
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]