Dandandan commented on code in PR #8868:
URL: https://github.com/apache/arrow-rs/pull/8868#discussion_r2540959570
##########
arrow-select/src/filter.rs:
##########
@@ -529,20 +529,24 @@ fn filter_null_mask(
fn filter_bits(buffer: &BooleanBuffer, predicate: &FilterPredicate) -> Buffer {
let src = buffer.values();
let offset = buffer.offset();
+ assert!(buffer.len() >= predicate.filter.len());
Review Comment:
Both here are representing the number of items/bits in the array, so no need
to divide by 8 :).
> I would feel better about this PR if we had some tests that triggered the
panic if we passed in too large a filter (or maybe that already exists 🤔 )
Done.
--
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]