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

Draft Highlight Wildcard #111

Closed
wants to merge 2 commits into from

Conversation

forestmvey
Copy link

Description

Add wildcard support in both SQL and PPL. This draft PR addresses using the . DOT notation to access nested fields of an expression.

Issues Resolved

Issue: 636

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.

Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
@forestmvey forestmvey requested a review from a team August 29, 2022 21:53
@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Merging #111 (5f60b7d) into draft-highlight-wildcard (124971c) will decrease coverage by 32.11%.
The diff coverage is n/a.

@@                       Coverage Diff                       @@
##             draft-highlight-wildcard     #111       +/-   ##
===============================================================
- Coverage                       94.88%   62.76%   -32.12%     
===============================================================
  Files                             289       10      -279     
  Lines                            7879      658     -7221     
  Branches                          573      118      -455     
===============================================================
- Hits                             7476      413     -7063     
+ Misses                            349      192      -157     
+ Partials                           54       53        -1     
Flag Coverage Δ
query-workbench 62.76% <ø> (ø)
sql-engine ?

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

Impacted Files Coverage Δ
...rg/opensearch/sql/analysis/ExpressionAnalyzer.java
...ensearch/sql/expression/ExpressionNodeVisitor.java
...h/sql/expression/function/OpenSearchFunctions.java
...search/sql/planner/physical/HighlightOperator.java
...pensearch/sql/ppl/parser/AstExpressionBuilder.java
...pensearch/sql/sql/parser/AstExpressionBuilder.java
.../storage/script/filter/ExpressionFilterScript.java
...nsearch/executor/protector/ExecutionProtector.java
...h/planner/logical/rule/PushProjectAndRelation.java
...earch/sql/data/utils/NaturalExprValueOrdering.java
... and 268 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -304,7 +304,7 @@ functionCall
;

highlightFunction
: HIGHLIGHT LR_BRACKET relevanceField RR_BRACKET
: HIGHLIGHT LR_BRACKET relevanceField RR_BRACKET (DOT qualifiedName)*
Copy link

@MaxKsyunz MaxKsyunz Aug 30, 2022

Choose a reason for hiding this comment

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

Querying complex values should be independent of highlight -- let's not tackle it as part of this PR.

Looks like SQL plugin does not support querying complex values returned by an expression and highlight('*') is an expression.

@forestmvey forestmvey closed this Aug 30, 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