Skip to content

Conversation

@Dr-Emann
Copy link
Member

closes #274

@Dr-Emann Dr-Emann force-pushed the iter_next_range branch 6 times, most recently from 282e13e to 7499198 Compare July 30, 2025 01:21
@Dr-Emann Dr-Emann requested a review from Copilot July 30, 2025 01:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new methods next_range and next_range_back to the Iter and IntoIter types for RoaringBitmap, enabling extraction of consecutive ranges of set bits from iterators rather than individual values.

  • Implementation of range extraction methods across all container types (array, bitmap, run)
  • Helper functions for finding contiguous ranges in array stores
  • Comprehensive test coverage including edge cases and multi-container scenarios

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
roaring/tests/iter_next_range.rs Comprehensive test suite covering various scenarios for the new range methods
roaring/src/bitmap/iter.rs Main implementation of next_range and next_range_back methods for public iterators
roaring/src/bitmap/container.rs Container-level wrapper methods that delegate to store implementations
roaring/src/bitmap/store/mod.rs Store iterator wrapper that dispatches to specific store implementations
roaring/src/bitmap/store/array_store/mod.rs Helper functions for finding contiguous ranges in sorted arrays
roaring/src/bitmap/store/bitmap_store.rs Bitmap store implementation with bit manipulation for range extraction
roaring/src/bitmap/store/interval_store.rs Run store implementation using interval-based range extraction
fuzz/fuzz_targets/arbitrary_ops/mod.rs Fuzz testing support for the new range methods

@Dr-Emann Dr-Emann marked this pull request as draft July 30, 2025 02:41
Provide an optimal way to iterate over the ranges of a bitmap
@Dr-Emann Dr-Emann marked this pull request as ready for review August 9, 2025 03:37
@Dr-Emann Dr-Emann requested a review from Kerollmops August 9, 2025 03:37
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good to me. Have you run the fuzzer for more than 30 minutes in the CI?

Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you for your work, again 👌

@Kerollmops Kerollmops added this pull request to the merge queue Sep 18, 2025
Merged via the queue into RoaringBitmap:main with commit ad96740 Sep 18, 2025
15 checks passed
@Dr-Emann Dr-Emann deleted the iter_next_range branch September 18, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: expose consecutive runs

2 participants