alamb commented on code in PR #11206:
URL: https://github.com/apache/arrow-rs/pull/11206#discussion_r4105088900
##########
arrow-select/src/filter.rs:
##########
@@ -254,10 +305,40 @@ pub struct FilterBuilder {
impl FilterBuilder {
/// Create a new [`FilterBuilder`] that can be used to construct a
[`FilterPredicate`]
pub fn new(filter: &BooleanArray) -> Self {
- Self::new_with_count(filter, filter.true_count())
+ // SAFETY: the count is computed from `filter` itself.
+ unsafe { Self::new_with_count(filter, filter.true_count()) }
}
- pub(crate) fn new_with_count(filter: &BooleanArray, count: usize) -> Self {
+ /// Create a new [`FilterBuilder`] from a mask whose number of selected
rows
Review Comment:
actually, then that would be a public API change so that is probably not ok
to do yet
--
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]