Skip to content
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

Fix: Improve collapse_overlapped_ranges function #2474

Merged

Conversation

gezihuzi
Copy link
Contributor

To fix: #2473

  • Refactor into separate sort_and_deduplicate_ranges and merge_overlapping_ranges functions
  • Enhance sorting to consider both start and end of ranges
  • Optimize merging logic to handle adjacent ranges
  • Add comprehensive examples in function documentation
  • Ensure proper handling of duplicate and unsorted input ranges
  • Improve overall efficiency and readability of range collapsing algorithm

- Refactor into separate sort_and_deduplicate_ranges and merge_overlapping_ranges functions
- Enhance sorting to consider both start and end of ranges
- Optimize merging logic to handle adjacent ranges
- Add comprehensive examples in function documentation
- Ensure proper handling of duplicate and unsorted input ranges
- Improve overall efficiency and readability of range collapsing algorithm
src/snippet/mod.rs Outdated Show resolved Hide resolved
@PSeitz PSeitz merged commit 95a4dde into quickwit-oss:main Sep 4, 2024
3 checks passed
@PSeitz
Copy link
Contributor

PSeitz commented Sep 4, 2024

Thanks, really nice PR with tests and docs!

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.

Incorrect range merging in snippet generation
2 participants