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

Update tests and test data for relevancy search functions #707

Conversation

Yury-Fridlyand
Copy link
Collaborator

Description

  • Reduce test data set (3.7k lines down to 60)
  • Update tests according to the new data set
  • Add new tests which validate additional parameters
  • Reorganize (rename, move) tests to have them stored under single standard

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

opensearch-trigger-bot bot and others added 20 commits April 19, 2022 18:10
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 0ae97ad)

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
…t#585)

* 2.0.0.0-rc1 release notes

Signed-off-by: vamsi-amazon <reddyvam@amazon.com>
(cherry picked from commit 4c7111a)

Co-authored-by: vamsi-amazon <99925918+vamsi-amazon@users.noreply.github.com>
…pensearch-project#589)

Signed-off-by: Joshua Li <joshuali925@gmail.com>
(cherry picked from commit a7d4395)

Co-authored-by: Joshua Li <joshuali925@gmail.com>
* Remove rc1 qualifier for 2.0

Signed-off-by: Joshua Li <joshuali925@gmail.com>
(cherry picked from commit d71cddc)
Signed-off-by: vamsi-amazon <reddyvam@amazon.com>
(cherry picked from commit 14fc606)
… HEAD

� Conflicts:
�	build.gradle
�	workbench/opensearch_dashboards.json
�	workbench/package.json
…_String. Added implementation for simple_query_string to use multiple flags seperated by pipes.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
…_String. Added implementation for simple_query_string to use multiple flags seperated by pipes.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
…gsinSimpleQueryString

Adds support for enum like values in flag argument in Simple Query String
… Integ-enumLikeValuesdSupprtForFalsinSimpleQueryString
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
…lsinSimpleQueryString' into dev-update-test-data-relevancy-search

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
…search

Update test data for relevancy search integration tests
…ata-relevancy-search

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner July 22, 2022 03:43
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2022

Codecov Report

Merging #707 (109afe9) into main (592c58b) will decrease coverage by 31.98%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main     #707       +/-   ##
=============================================
- Coverage     94.74%   62.76%   -31.99%     
=============================================
  Files           283       10      -273     
  Lines          7676      658     -7018     
  Branches        560      118      -442     
=============================================
- Hits           7273      413     -6860     
+ Misses          349      192      -157     
+ Partials         54       53        -1     
Flag Coverage Δ
query-workbench 62.76% <ø> (ø)
sql-engine ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ilter/lucene/relevance/SimpleQueryStringQuery.java
...nsearch/sql/expression/window/WindowFunctions.java
...h/sql/exception/ExpressionEvaluationException.java
...arch/sql/expression/aggregation/MaxAggregator.java
...sql/expression/aggregation/AggregatorFunction.java
...a/org/opensearch/sql/data/model/ExprTimeValue.java
...ch/sql/data/utils/NullsFirstExprValueOrdering.java
...arch/sql/expression/aggregation/AvgAggregator.java
...rg/opensearch/sql/data/model/ExprMissingValue.java
...a/org/opensearch/sql/data/model/ExprNullValue.java
... and 263 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the change!

…ata-relevancy-search

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
@joshuali925 joshuali925 merged commit 5c6fd72 into opensearch-project:main Jul 25, 2022
@Yury-Fridlyand Yury-Fridlyand deleted the integ-update-test-data-relevancy-search branch July 25, 2022 22:28
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 27, 2022
Signed-off-by: Mitchell Gale <mitchellg@bitquilltech.com>

Adds support for multiple enum like values to be passed to simple query string.

Update tests and test data for relevancy search functions (opensearch-project#707)

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>

Added integration test for escape character in select statement.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

AOS-637: PoC remove escape characters

Signed-off-by: Andrew Carbonetto <andrewc@AndrewsMBP2022.local>

Fixed number of escape characters returned by plugin. Number returned is now expected number.

'I\'m' -> I'm
'I\\''m' -> I\'m
'I\\\'m' -> I\'m

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Addedd test for 'im' in literals.txt.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added unit test for unquoteText in StringUtils.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Removed old unescapeBackslashes from StringUtils which was replaced by unquoteText.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Removed * from import of Assertions in StringUtilsTest.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Fixed indentation. Moved to 2 space indents to replace 4 space indents.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Put static imports before regular imports. Maintained alphabetical order in StringUtilsTest.java

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added case for double single quote which converts to a single single quote.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added new line at end of StringUtilsTest.java and added space between static and non-static imports

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Replaced statement lambda with expression lambda.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Allows for quotes(") and backticks(`) to be around strings in result.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added additional test cases to unquoteTest() in StringUtilsTest.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added additional test cases to unquoteTest() in StringUtilsTest.java. Added case for double, double quote being converted to single, double quote.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Made double single and double double quotes only reduce down to a single of their respective type when the string is quoted by the same type. Added some unit tests to test for that condition in StringUtilsTest.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Fixed whitespace found before comma in StringUtilsTest.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added more tests. Removed formatting changes in OpenSearchExecutionEngine.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Reverting ProjectOperator.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Resolved issue with overlapping replacement of quotes (double and single).

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Moved `replace` periods to new line.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Changed StringUtils.java to use String Builder. Updated some tests.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Changed over to fully use string builder and works with escape as well as double quotes.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Fixed formatting of StringUtilsTest.java, removed code in comments in StringUtils.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Double quote implemented to convert to single quote when string is surrounded by same string. Consistent with MySQL standard.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Cleaned up redundant code from StringUtils.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Removed IT test added.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Moved whichquote inside unquote text. Removed large portion of code from if statement to break off for a return. Added unit test, removed unit tests for whichquote function. Removed whichquote function.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added some additional unit tests. Added branch for case of quoted by back tick to skip over String Builder. Fixed issue with strings passed to unquotetext being too small casuing array bounds access issue.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Fixed test case expected.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Reverting changes to OpenSearchExecutionEngine.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Reverting changes to ProjectOperator.java.java.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added test cases in literals.txt.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>

Added back tick and moved String builder declaration down.

Signed-off-by: mitchellg <mitchellg@bitquilltech.com>
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.

None yet

6 participants