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

Add support for match_phrase_prefix in SQL and PPL #79

Merged
merged 35 commits into from
Jun 28, 2022

Conversation

MaxKsyunz
Copy link

@MaxKsyunz MaxKsyunz commented Jun 23, 2022

Add support for match_phrase_prefix in SQL and PPL

Issues Resolved

#186

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.

MaxKsyunz and others added 30 commits June 3, 2022 17:55
Change generateQueries signature to use more appropriate Map type.

Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
…quired

Add match_phrase_prefix to SQL with required parameters.
Private constants look odd.

Signed-off-by: MaxKsyunz <[email protected]>
A convenience method to simplify writing tests.

Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
…l-opt

match_phrase_prefix in SQL with optional parameters
…refix-#186

# Conflicts:
#	core/src/main/java/org/opensearch/sql/expression/DSL.java
#	core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunctions.java
#	core/src/test/java/org/opensearch/sql/analysis/ExpressionAnalyzerTest.java
#	opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java
#	opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java
#	sql/src/main/antlr/OpenSearchSQLLexer.g4
#	sql/src/main/antlr/OpenSearchSQLParser.g4
…l-req

Add match_phrase_prefix support to where command in PPL
Signed-off-by: MaxKsyunz <[email protected]>
…l-itests

Add integration tests for match_phrase_prefix in SQL
- match_phrase was used in a couple places.
- some optional parameters were missing.

Signed-off-by: MaxKsyunz <[email protected]>
match_phrase_prefix documentation for SQL and PPL
…l_it

Integration tests for match_phrase_prefix in PPL
@MaxKsyunz MaxKsyunz requested a review from a team June 23, 2022 17:59
@codecov
Copy link

codecov bot commented Jun 23, 2022

Codecov Report

Merging #79 (e9f2af3) into integ-match_phrase_prefix-#186 (90ccc3e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                        Coverage Diff                        @@
##             integ-match_phrase_prefix-#186      #79   +/-   ##
=================================================================
  Coverage                             97.71%   97.71%           
- Complexity                             2801     2810    +9     
=================================================================
  Files                                   270      271    +1     
  Lines                                  6912     6929   +17     
  Branches                                439      439           
=================================================================
+ Hits                                   6754     6771   +17     
  Misses                                  157      157           
  Partials                                  1        1           
Flag Coverage Δ
sql-engine 97.71% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...arch/storage/script/filter/FilterQueryBuilder.java 100.00% <ø> (ø)
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <100.00%> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <100.00%> (ø)
...h/sql/expression/function/OpenSearchFunctions.java 100.00% <100.00%> (ø)
...ilter/lucene/relevance/MatchPhrasePrefixQuery.java 100.00% <100.00%> (ø)
...ript/filter/lucene/relevance/MatchPhraseQuery.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90ccc3e...e9f2af3. Read the comment docs.

…refix-#186

# Conflicts:
#	core/src/main/java/org/opensearch/sql/expression/DSL.java
#	docs/user/dql/functions.rst
#	docs/user/ppl/functions/relevance.rst
Signed-off-by: MaxKsyunz <[email protected]>
@MaxKsyunz MaxKsyunz requested a review from acarbonetto June 27, 2022 19:59
Copy link

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

LGTM

@MaxKsyunz MaxKsyunz merged commit 6562109 into integ-match_phrase_prefix-#186 Jun 28, 2022
@MaxKsyunz MaxKsyunz deleted the dev-match_phrase_prefix-#186 branch June 28, 2022 07:51
andy-k-improving pushed a commit that referenced this pull request Nov 16, 2024
Include whether to add z coords into Geometry or not
as param to random function, except Polygon.
Generating true random polygon is very complicated since 3 points at least
to be non-collinear. Will add support to be truly random
during later commit.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
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.

3 participants