File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
crates/polars-arrow/src/bitmap
py-polars/tests/unit/operations Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -242,13 +242,14 @@ impl BitmapBuilder {
242242 length : usize ,
243243 repeats : usize ,
244244 ) {
245+ debug_assert ! ( 8 * slice. len( ) >= offset + length) ;
245246 if repeats == 0 {
246247 return ;
247248 }
248249 if repeats == 1 {
249250 return self . extend_from_slice_unchecked ( slice, offset, length) ;
250251 }
251- for bit_idx in offset..length {
252+ for bit_idx in offset..( offset + length) {
252253 let bit = ( * slice. get_unchecked ( bit_idx / 8 ) >> ( bit_idx % 8 ) ) & 1 != 0 ;
253254 self . extend_constant ( repeats, bit) ;
254255 }
Original file line number Diff line number Diff line change 1515if TYPE_CHECKING :
1616 from hypothesis .strategies import DrawFn , SearchStrategy
1717
18+ from tests .conftest import PlMonkeyPatch
19+
1820
1921@pytest .mark .parametrize (
2022 ("pred_1" , "pred_2" ),
@@ -690,3 +692,4 @@ def test_boolean_predicate_join_where() -> None:
690692 assert "NESTED LOOP JOIN" in plan
691693
692694 assert_frame_equal (q .collect (), expect )
695+
You can’t perform that action at this time.
0 commit comments