sql icon indicating copy to clipboard operation
sql copied to clipboard

Refactor OpenSearch Relevance Functions out of Core

Open MitchellGale opened this issue 2 years ago • 1 comments

Description

Moving Relevance-based search functions out of core module and into opensearch module. This only affects the Function Resolver.

Out of Scope:

  • OpenSearchFunction resolver was not moved, as the score tracking is needed in the analyzer and optimizer.
  • Parser
  • Analyzer and its sub-components
  • LogicalPlan or optimizer Design for refactoring the analyzer and creating an OpenSearch analyzer: https://github.com/Bit-Quill/opensearch-project-sql/pull/331

Issues Resolved

Partially fixes https://github.com/opensearch-project/sql/issues/811

Internal review: https://github.com/Bit-Quill/opensearch-project-sql/pull/338

Check List

  • [x] New functionality includes testing.
    • [x] All tests pass, including unit test, integration test and doctest
  • [x] New functionality has been documented.
    • [x] New functionality has javadoc added
    • [x] New functionality has user manual doc added
  • [x] 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.

MitchellGale avatar Aug 22 '23 23:08 MitchellGale

Codecov Report

Merging #2019 (f008573) into main (ed2b683) will increase coverage by 0.00%. Report is 1 commits behind head on main. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #2019   +/-   ##
=========================================
  Coverage     97.30%   97.30%           
- Complexity     4623     4626    +3     
=========================================
  Files           407      409    +2     
  Lines         11935    11946   +11     
  Branches        828      830    +2     
=========================================
+ Hits          11613    11624   +11     
  Misses          315      315           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.30% <100.00%> (+<0.01%) :arrow_up:

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

Files Changed Coverage Δ
...rg/opensearch/sql/analysis/ExpressionAnalyzer.java 100.00% <100.00%> (ø)
...rch/sql/analysis/ExpressionReferenceOptimizer.java 100.00% <100.00%> (ø)
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <100.00%> (ø)
...expression/function/BuiltinFunctionRepository.java 100.00% <100.00%> (ø)
...ql/expression/function/NestedFunctionResolver.java 100.00% <100.00%> (ø)
...ch/sql/expression/function/OpenSearchFunction.java 100.00% <100.00%> (ø)
...s/storage/OpenSearchDataSourceMetadataStorage.java 98.77% <100.00%> (+0.01%) :arrow_up:
.../sql/opensearch/functions/OpenSearchFunctions.java 100.00% <100.00%> (ø)
...pensearch/functions/RelevanceFunctionResolver.java 100.00% <100.00%> (ø)
...ql/opensearch/storage/OpenSearchStorageEngine.java 100.00% <100.00%> (ø)
... and 1 more

codecov[bot] avatar Aug 23 '23 00:08 codecov[bot]