alamb commented on code in PR #8868:
URL: https://github.com/apache/arrow-rs/pull/8868#discussion_r2539708958


##########
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:
   Doesn't this also have to take into account the fact that the predicate is 
in bits (should this be dividing 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 🤔 )



-- 
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]

Reply via email to