-
Notifications
You must be signed in to change notification settings - Fork 974
Refactor filter functions as methods on FilterPredicate
struct
#7771
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
base: main
Are you sure you want to change the base?
Conversation
FilterPredicate
struct
🤖 |
@@ -180,25 +180,15 @@ pub fn prep_null_mask_filter(filter: &BooleanArray) -> BooleanArray { | |||
pub fn filter(values: &dyn Array, predicate: &BooleanArray) -> Result<ArrayRef, ArrowError> { | |||
let mut filter_builder = FilterBuilder::new(predicate); | |||
|
|||
if multiple_arrays(values.data_type()) { | |||
if FilterBuilder::multiple_arrays(values.data_type()) { |
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.
The diff makes this PR look like a much larger change than it really is -- I found using whitespace blind diff was easier to see the changes: https://github.com/apache/arrow-rs/pull/7771/files?w=1
🤖: Benchmark completed Details
|
Wow those are some noisy benchmarks 🤔 |
🤖 |
🤖: Benchmark completed Details
|
My conclusion from the benchmark numbers is that this PR doesn't change performance, but there seems to be a lot of noise |
(This is a draft for now until I have a PR that shows how it works)
Which issue does this PR close?
push_batch_with_filter
for primitive array #7762Rationale for this change
I would like to reuse some part of the existing filtering logic for #7762. However, it is currently split into a bunch of free functions that all take a
FilterPredicate
argument. By making them methods onFilterPredicate
I will be able to reuse the codeWhat changes are included in this PR?
filter_*
methods into functions onFilterPredicate
(note all the methods are still private so this doesn't change the public API)Are these changes tested?
Existing CI covers them functionally
I will run performance tests to ensure we don't mess up performance
Are there any user-facing changes?
There are no intended user facing changes