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 match_phrase filter function in SQL and PPL #47

Closed
wants to merge 51 commits into from

Conversation

MaxKsyunz
Copy link

Description

  1. Support match_phrase filter function in SQL.
  2. Support match_phrase filter function in PPL.

Issues Resolved

Resolves #185 except for backwards compatibility with the legacy SQL engine. This will be addressed in a separate commit.

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 April 22, 2022 04:42
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
…ents.

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Added a couple test for match_test in PPL.
The tests are currently @ignore'd until more of the issue is complete.

Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Create a parametrized test for PPLSyntax parser.

Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
…x-min

Add match_phrase and slop optional parameter to SQL parser
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
…for `MATCH` are also updated.

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
1. Use PPL instead of SQL as samples.
2. Use data that doctest runs with.

Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Yury-Fridlyand and others added 11 commits May 3, 2022 22:08
… samples. This fixes doctest.

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
…ch-project-sql into dev-match_phrase-#185

Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
@MaxKsyunz MaxKsyunz requested review from a team and raymond-lum May 5, 2022 22:01
@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #47 (3723942) into integ-match_phrase-#185 (4ec3e53) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 3723942 differs from pull request most recent head 7d2b20f. Consider uploading reports for the commit 7d2b20f to get more accurate results

@@                    Coverage Diff                     @@
##             integ-match_phrase-#185      #47   +/-   ##
==========================================================
  Coverage                      97.67%   97.67%           
+ Complexity                      2743     2742    -1     
==========================================================
  Files                            266      267    +1     
  Lines                           6797     6801    +4     
  Branches                         433      436    +3     
==========================================================
+ Hits                            6639     6643    +4     
  Misses                           157      157           
  Partials                           1        1           
Flag Coverage Δ
sql-engine 97.67% <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%> (ø)
...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 4ec3e53...7d2b20f. Read the comment docs.

MaxKsyunz and others added 10 commits May 5, 2022 23:12
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
@MaxKsyunz
Copy link
Author

Recreating the pull request.

@MaxKsyunz MaxKsyunz closed this May 6, 2022
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.

2 participants