-
Notifications
You must be signed in to change notification settings - Fork 0
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 Relevance Fields Permissive When Fields are Missing. #158
Fix Relevance Fields Permissive When Fields are Missing. #158
Conversation
d5c0067
to
4fa357c
Compare
Codecov Report
@@ Coverage Diff @@
## integ-fix-permissive-relevance-fields #158 +/- ##
========================================================================
Coverage ? 98.27%
Complexity ? 3366
========================================================================
Files ? 327
Lines ? 8486
Branches ? 556
========================================================================
Hits ? 8340
Misses ? 142
Partials ? 4
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
4fa357c
to
eb1e577
Compare
eb1e577
to
6020b4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have integration tests?
core/src/test/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizerTest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/RelevanceQueryAnalyzer.java
Outdated
Show resolved
Hide resolved
I have added some IT tests to cover invalid fields in my latest commit. |
95e9683
to
8144b38
Compare
beccd5e
to
a5d26cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
In the upstream PR, could you reword the title? It is used to generate release notes like these.
Something like "validate field and fields parameters in relevance search functions" would work.
a5d26cf
to
641f751
Compare
Signed-off-by: forestmvey <forestv@bitquilltech.com>
641f751
to
2ad64b2
Compare
Signed-off-by: forestmvey forestv@bitquilltech.com
Description
Relevance functions that query a field should act similar to how a
SELECT
query works. If a field is queried that does not exist, aSemanticCheckException
should be thrown.Example Queryies
SELECT * FROM stackexchange_beer WHERE query_string([invalid], 'beer');
SELECT * FROM stackexchange_beer WHERE match(invalid, 'beer');
Issues Resolved
Issue: 613
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.