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 Highlight Wildcard in SQL #827

Merged

Conversation

forestmvey
Copy link
Collaborator

@forestmvey forestmvey commented Sep 13, 2022

Description

Add support for wildcard in SQL with optional arguments pre_tags and post_tags.

Sample Query

select highlight('Body'), highlight('T*') from beer where multi_match([Title, Body, Tags], 'taste');

Issues Resolved

Issue: 636

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
Copy link
Collaborator

@forestmvey please update the target branch from main to 2.x.

@forestmvey forestmvey force-pushed the integ_highlight-wildcard-sql-ppl branch from 511fd88 to d6417ef Compare September 14, 2022 21:42
@forestmvey forestmvey changed the base branch from main to 2.x September 14, 2022 21:42
@dai-chen dai-chen added enhancement New feature or request SQL PPL Piped processing language labels Sep 21, 2022
@forestmvey forestmvey force-pushed the integ_highlight-wildcard-sql-ppl branch 3 times, most recently from 28e98d3 to 120fdb5 Compare October 3, 2022 15:57
@forestmvey forestmvey force-pushed the integ_highlight-wildcard-sql-ppl branch from 120fdb5 to 45e6d0c Compare October 4, 2022 14:48
@codecov-commenter
Copy link

Codecov Report

Merging #827 (45e6d0c) into 2.x (057fa44) will decrease coverage by 2.82%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x     #827      +/-   ##
============================================
- Coverage     97.87%   95.04%   -2.83%     
- Complexity     3020     3039      +19     
============================================
  Files           284      294      +10     
  Lines          7425     8134     +709     
  Branches        475      604     +129     
============================================
+ Hits           7267     7731     +464     
- Misses          157      349     +192     
- Partials          1       54      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 97.88% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...ain/java/org/opensearch/sql/analysis/Analyzer.java 100.00% <ø> (ø)
...h/sql/expression/function/OpenSearchFunctions.java 100.00% <ø> (ø)
...rg/opensearch/sql/analysis/ExpressionAnalyzer.java 100.00% <100.00%> (ø)
...org/opensearch/sql/analysis/HighlightAnalyzer.java 100.00% <100.00%> (ø)
...opensearch/sql/expression/HighlightExpression.java 100.00% <100.00%> (ø)
...ensearch/sql/planner/logical/LogicalHighlight.java 100.00% <100.00%> (ø)
...opensearch/sql/planner/logical/LogicalPlanDSL.java 100.00% <100.00%> (ø)
...l/opensearch/request/OpenSearchRequestBuilder.java 100.00% <100.00%> (ø)
...search/sql/opensearch/storage/OpenSearchIndex.java 100.00% <100.00%> (ø)
...java/org/opensearch/sql/ppl/parser/AstBuilder.java 100.00% <100.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@forestmvey forestmvey force-pushed the integ_highlight-wildcard-sql-ppl branch from 45e6d0c to df1e18d Compare October 5, 2022 19:05
@forestmvey forestmvey changed the title Add Support for Highlight Wildcard in SQL and PPL Add Support for Highlight Wildcard in SQL Oct 5, 2022
…support in SQL and PPL.

Signed-off-by: forestmvey <forestv@bitquilltech.com>
@forestmvey forestmvey force-pushed the integ_highlight-wildcard-sql-ppl branch from df1e18d to b5a287c Compare October 5, 2022 20:37
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!

@dai-chen dai-chen merged commit c3840b6 into opensearch-project:2.x Oct 11, 2022
GabeFernandez310 pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Oct 19, 2022
…support in SQL and PPL. (opensearch-project#827)

Signed-off-by: forestmvey <forestv@bitquilltech.com>

Signed-off-by: forestmvey <forestv@bitquilltech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PPL Piped processing language SQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants