Skip to content

Conversation

@GabeFernandez310
Copy link
Contributor

@GabeFernandez310 GabeFernandez310 commented Nov 18, 2022

Description

Adds match_query and matchquery as alternate syntax for match function which currently exists in OpenSearch.
This is being done to support legacy syntax.

Queries can be performed using the following syntax :

matchquery(field, 'query')
match_query(field, 'query')

Example:

SELECT field FROM index WHERE matchquery(field, 'query');
SELECT field FROM index WHERE match_query(field, 'query');

These queries should return the same result as match(field, 'query')

Issues Resolved

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.

GabeFernandez310 and others added 15 commits November 11, 2022 15:45
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
…h-function-alternate

Add Match_query And Matchquery As Alternate Syntax for Match Function
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
@GabeFernandez310 GabeFernandez310 requested a review from a team as a code owner November 18, 2022 21:42
@GabeFernandez310 GabeFernandez310 changed the title Integ add legacy syntax for match function Add Support for Legacy Syntax For Match Function In New Engine Nov 18, 2022
@GabeFernandez310 GabeFernandez310 changed the title Add Support for Legacy Syntax For Match Function In New Engine Add Support For Legacy Syntax For Match Function In New Engine Nov 18, 2022
Yury-Fridlyand
Yury-Fridlyand previously approved these changes Nov 18, 2022
acarbonetto
acarbonetto previously approved these changes Nov 22, 2022
Signed-off-by: GabeFernandez310 <[email protected]>
…om:Bit-Quill/opensearch-project-sql into integ-add-legacy-syntax-for-match-function-alternate
@GabeFernandez310 GabeFernandez310 requested review from acarbonetto and removed request for dai-chen November 23, 2022 16:37
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

❌ Patch coverage is 99.78214% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.76%. Comparing base (03f30e3) to head (4887d94).
⚠️ Report is 514 commits behind head on 2.x.

Files with missing lines Patch % Lines
...search/sql/opensearch/security/SecurityAccess.java 0.00% 1 Missing ⚠️

❌ Your project status has failed because the head coverage (95.76%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #1090      +/-   ##
============================================
- Coverage     98.27%   95.76%   -2.52%     
- Complexity     3351     3454     +103     
============================================
  Files           327      355      +28     
  Lines          8457     9248     +791     
  Branches        553      666     +113     
============================================
+ Hits           8311     8856     +545     
- Misses          142      334     +192     
- Partials          4       58      +54     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.28% <99.78%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@dai-chen dai-chen 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 changes!

@dai-chen dai-chen added enhancement New feature or request legacy Issues related to legacy query engine to be deprecated labels Nov 28, 2022
@dai-chen dai-chen merged commit 06b8a29 into opensearch-project:2.x Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request legacy Issues related to legacy query engine to be deprecated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants