Fix wildcard query analyzer match-all leak#21487
Conversation
PR Reviewer Guide 🔍(Review updated until commit 3e6b762)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 3e6b762 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit e8fd46d
Suggestions up to commit ad60310
Suggestions up to commit 957f292
Suggestions up to commit 7fdad9b
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21487 +/- ##
============================================
+ Coverage 73.45% 73.51% +0.05%
- Complexity 74591 74618 +27
============================================
Files 5980 5980
Lines 338779 338784 +5
Branches 48848 48849 +1
============================================
+ Hits 248849 249054 +205
+ Misses 70079 69871 -208
- Partials 19851 19859 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a815211 to
957f292
Compare
|
Persistent review updated to latest commit 957f292 |
|
Persistent review updated to latest commit ad60310 |
|
Persistent review updated to latest commit e8fd46d |
Signed-off-by: Baekgyu <baekgyukim.dev@gmail.com>
|
Persistent review updated to latest commit 3e6b762 |
|
❌ Gradle check result for 3e6b762: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
This PR fixes a
query_stringwildcard query correctness bug where analyzer-stripped wildcard patterns can unintentionally match documents.Example scenario:
*asdf*.asdf, is stripped during analysis.1234, can be returned.Expected behavior:
*,**, and***should continue to behave as match-all patterns.Fix:
CompiledAutomaton.AUTOMATON_TYPE.ALL).match_no_docs.AUTOMATON_TYPE.ALL, so?-based patterns (?,??,*?*,**?) compile toNORMALand are unaffected.Related Issues
Resolves #21280
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.