[Backport 2.x] Optimize global ordinal includes/excludes for prefix matching#15324
Merged
[Backport 2.x] Optimize global ordinal includes/excludes for prefix matching#15324
Conversation
* Optimize global ordinal includes/excludes for prefix matching If an aggregration specifies includes or excludes based on a regular expression, and the regular expression has a finite expansion followed by .*, then we can optimize the global ordinal filter. Specifically, in this case, we can expand the matching prefixes, then include/exclude the range of global ordinals that start with each prefix. Signed-off-by: Michael Froh <froh@amazon.com> * Add unit test Signed-off-by: Michael Froh <froh@amazon.com> * Add changelog entry Signed-off-by: Michael Froh <froh@amazon.com> * Improve test coverage Updated the unit test to be functionally equivalent, but it covers more of the regex logic. Signed-off-by: Michael Froh <froh@amazon.com> * Improve test coverage Signed-off-by: Michael Froh <froh@amazon.com> * Fix bug in exclude-only case with no doc values in segment Signed-off-by: Michael Froh <froh@amazon.com> * Address comments from @mch2 Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit 13163ab) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Contributor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #15324 +/- ##
============================================
+ Coverage 71.59% 71.61% +0.02%
- Complexity 62916 62969 +53
============================================
Files 5157 5157
Lines 295230 295334 +104
Branches 42971 43000 +29
============================================
+ Hits 211368 211507 +139
+ Misses 66150 66066 -84
- Partials 17712 17761 +49 ☔ View full report in Codecov by Sentry. |
mch2
approved these changes
Aug 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 13163ab from #14371.