-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added design for core refactor #331
base: integ-core-refactor-docs
Are you sure you want to change the base?
Conversation
Signed-off-by: Guian Gumpac <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-core-refactor-docs #331 +/- ##
===========================================================
Coverage 97.42% 97.42%
Complexity 4647 4647
===========================================================
Files 408 408
Lines 11526 11526
Branches 839 839
===========================================================
Hits 11229 11229
Misses 290 290
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
``` | ||
|
||
```mermaid | ||
flowchart LR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is the preferred diagram here? Sequence or flowchart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are fine
``` | ||
|
||
```mermaid | ||
flowchart LR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are fine
|
||
# 2. Requirements | ||
|
||
Resolve https://github.com/opensearch-project/sql/issues/811 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add more info. Probably, describe a user story with this feature implemented: plugin for plugin case. It also add dependency clean up and extensibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rename, core refactor
is too common.
@@ -0,0 +1,71 @@ | |||
# 1. Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an abstract, title or intro.
Core LogicalPlanOptimizer ->> #8249;DataSource#8250; LogicalPlanOptimizer: getList() | ||
#8249;DataSource#8250; LogicalPlanOptimizer -->> Core LogicalPlanOptimizer: Datasource specific rules list | ||
Core LogicalPlanOptimizer -->> Planner: LogicalPlan | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe:
- discovered DS interfaces, for example:
parse
for UDFparse
for identifier- analyze, optimize, etc
- API to plug/attach new DS on runtime
- how parser with UDF should work
- algorithm of resolution of a DS for a query with examples; consider tricky examples, when UDF or identifier exists in multiple DS
- override policy and workflow (in case if a DS overrides a built-in function), or if it is prohibited - how it is checked
- Query processing flow and response if UDF/identifier isn't resolved
|
||
# 2. Requirements | ||
|
||
Resolve https://github.com/opensearch-project/sql/issues/811 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this resolve the entire issue? According to opensearch-project#811 (comment), I believe this only resolves core functions. But does it also refactor the parser and pull out the push-down functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, I think we need to list exactly what we are resolving as part of issue opensearch-project#811.
@@ -0,0 +1,71 @@ | |||
# 1. Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this file a bit more specifically? I think core-refactor doesn't describe the changes or objectives accurately enough.
|
||
- Using data sources other than OpenSearch, users will encounter a `SyntaxCheckException` when they query with OpenSearch specific functions. (Some of these functions can be found in https://opensearch.org/docs/latest/search-plugins/sql/sql/functions/) | ||
- The Parser will have a different token to categorize OpenSearch functions. | ||
- Core module will no longer contain OpenSearch functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the #1 goal, right?
Everything is a by-product of getting the functions out of the core
module.
## 2.2 Functional change | ||
|
||
- Using data sources other than OpenSearch, users will encounter a `SyntaxCheckException` when they query with OpenSearch specific functions. (Some of these functions can be found in https://opensearch.org/docs/latest/search-plugins/sql/sql/functions/) | ||
- The Parser will have a different token to categorize OpenSearch functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a architectural design element, not functional. The users won't see this, nor is this a requirement.
Description
Proposal for refactoring core to remove OpenSearch specific functions.
Issues Resolved
opensearch-project#811
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.