Integ match bool prefix #187#634
Merged
joshuali925 merged 41 commits intoopensearch-project:mainfrom Jun 27, 2022
Merged
Conversation
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Required renaming analyzeSyntax to parse. 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>
Added base class that is commont to match_query and match_bool_prefix and others. 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: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Thus completing update from upstream/main. Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
IntelliJ's Cleanup considered these casts "redundant" and removed them. This caused compilation to fail. Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
match_bool_prefix merge dev branch 2#187
Signed-off-by: forestmvey <forestv@bitquilltech.com>
…function Signed-off-by: forestmvey <forestv@bitquilltech.com>
Mention analyzer and operator optional parameters. Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
…-params Add analyzer and operator parameters to match_bool_prefix
Yury-Fridlyand
previously approved these changes
Jun 17, 2022
acarbonetto
previously approved these changes
Jun 17, 2022
added 2 commits
June 17, 2022 17:46
…efix-#187 # Conflicts: # core/src/main/java/org/opensearch/sql/expression/DSL.java # core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunctions.java # docs/user/dql/functions.rst # opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java # ppl/src/main/antlr/OpenSearchPPLLexer.g4 # sql/src/main/antlr/OpenSearchSQLParser.g4
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
eefa7e6
The method was renamed and compilation failed without this change. Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## main #634 +/- ##
=============================================
- Coverage 94.67% 62.76% -31.92%
=============================================
Files 280 10 -270
Lines 7570 658 -6912
Branches 558 119 -439
=============================================
- Hits 7167 413 -6754
+ Misses 349 192 -157
+ Partials 54 53 -1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
acarbonetto
previously approved these changes
Jun 20, 2022
joshuali925
previously approved these changes
Jun 21, 2022
Yury-Fridlyand
previously approved these changes
Jun 22, 2022
Comment on lines
+152
to
+156
| Limitations | ||
| >>>>>>>>>>> | ||
|
|
||
| The relevance functions are available to execute only in OpenSearch DSL but not in memory as of now, so the relevance search might fail for queries that are too complex to translate into DSL if the relevance function is following after a complex PPL query. To make your queries always work-able, it is recommended to place the relevance commands as close to the search command as possible, to ensure the relevance functions are eligible to push down. For example, a complex query like ``search source = people | rename firstname as name | dedup account_number | fields name, account_number, balance, employer | where match(employer, 'Open Search') | stats count() by city`` could fail because it is difficult to translate to DSL, but it would be better if we rewrite it to an equivalent query as ``search source = people | where match(employer, 'Open Search') | rename firstname as name | dedup account_number | fields name, account_number, balance, employer | stats count() by city`` by moving the where command with relevance function to the second command right after the search command, and the relevance would be optimized and executed smoothly in OpenSearch DSL. See `Optimization <../../optimization/optimization.rst>`_ to get more details about the query engine optimization. No newline at end of file | ||
| The relevance functions are available to execute only in OpenSearch DSL but not in memory as of now, so the relevance search might fail for queries that are too complex to translate into DSL if the relevance function is following after a complex PPL query. To make your queries always work-able, it is recommended to place the relevance commands as close to the search command as possible, to ensure the relevance functions are eligible to push down. For example, a complex query like ``search source = people | rename firstname as name | dedup account_number | fields name, account_number, balance, employer | where match(employer, 'Open Search') | stats count() by city`` could fail because it is difficult to translate to DSL, but it would be better if we rewrite it to an equivalent query as ``search source = people | where match(employer, 'Open Search') | rename firstname as name | dedup account_number | fields name, account_number, balance, employer | stats count() by city`` by moving the where command with relevance function to the second command right after the search command, and the relevance would be optimized and executed smoothly in OpenSearch DSL. See `Optimization <../../optimization/optimization.rst>`_ to get more details about the query engine optimization. |
Collaborator
There was a problem hiding this comment.
I think that Limitations block should be last in the file.
…efix-#187 Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
76b9158
added 2 commits
June 23, 2022 13:52
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Yury-Fridlyand
approved these changes
Jun 23, 2022
acarbonetto
approved these changes
Jun 27, 2022
dai-chen
approved these changes
Jun 27, 2022
Collaborator
dai-chen
left a comment
There was a problem hiding this comment.
Thanks for the changes!
joshuali925
approved these changes
Jun 27, 2022
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
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
match_bool_prefixin sql.match_bool_prefixin ppl.Issues Resolved
Resolves: 187
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.