-
Couldn't load subscription status.
- Fork 337
Handle cases gracefully where null field name is passed to LeafReader methods #5537
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
Merged
Conversation
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
… methods Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5537 +/- ##
==========================================
+ Coverage 72.88% 72.95% +0.06%
==========================================
Files 400 405 +5
Lines 24935 25161 +226
Branches 3806 3829 +23
==========================================
+ Hits 18173 18355 +182
- Misses 4912 4946 +34
- Partials 1850 1860 +10
🚀 New features to boost your workflow:
|
|
Thank you for the quick fix @nibix ! |
Signed-off-by: Craig Perkins <cwperx@amazon.com>
cwperks
previously approved these changes
Aug 4, 2025
Signed-off-by: Nils Bandener <33570290+nibix@users.noreply.github.com>
RyanL1997
previously approved these changes
Aug 6, 2025
cwperks
previously approved these changes
Aug 6, 2025
Signed-off-by: Craig Perkins <cwperx@amazon.com>
cwperks
approved these changes
Aug 6, 2025
DarshitChanpura
approved these changes
Aug 6, 2025
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.
Description
In a couple of cases, OpenSearch calls
LeafReadermethods with nullfieldNameparameters. The semantics of this are a bit unclear; in most cases, the underlyingLeafReadermethods will just also returnnull. However, I cannot prove that this will be always the case.Thus, the change in this PR does not try to put semantics into this; it just handles the
nullcase gracefully by using a NPE safe replacement value. That has the effect that users with high restrictions will also get an restriction enforced on the result returned in thenullcases. Users without restrictions will be still passed through to the underlyingLeafReader.See also #5504
Issues Resolved
Fixes opensearch-project/OpenSearch-Dashboards#9873
Testing
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.