-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cache FilterMask iterators #1351
Conversation
@@ -10,47 +10,60 @@ impl FilterFn for BoolArray { | |||
let validity = self.validity().filter(&mask)?; | |||
|
|||
let buffer = match mask.iter()? { | |||
FilterIter::Indices(iter) => { | |||
filter_indices(self.boolean_buffer(), mask.true_count(), iter) | |||
FilterIter::Indices(indices) => filter_indices_slice(&self.boolean_buffer(), indices), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling filter_indices_slice
for the indices branch looks... incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or, maybe correct but just confusing name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small naming nit, otherwise looks great
This PR uses a cute trick to pre-cache filter indices when a FilterMask is cloned. Unfortunately... we have to clone one every time we pass it into with_dyn!!