-
Notifications
You must be signed in to change notification settings - Fork 141
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 Statement, QueryExecution and QueryManager #845
Add Statement, QueryExecution and QueryManager #845
Conversation
Metrics.getInstance() | ||
.getNumericalMetric(MetricName.PPL_FAILED_REQ_COUNT_CUS) | ||
.increment(); | ||
return channel -> |
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.
remove the schedule logic. In OpenSearch, QueryManager will schedule the query in sql-worker thread.
Codecov Report
@@ Coverage Diff @@
## feature/maximus-m1 #845 +/- ##
========================================================
- Coverage 97.58% 94.92% -2.66%
- Complexity 3177 3203 +26
========================================================
Files 307 325 +18
Lines 7898 8612 +714
Branches 513 634 +121
========================================================
+ Hits 7707 8175 +468
- Misses 190 382 +192
- Partials 1 55 +54
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Peng Huo <penghuo@gmail.com>
16eb89e
to
2080313
Compare
core/src/main/java/org/opensearch/sql/ast/statement/Explain.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/executor/execution/AbstractPlan.java
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/executor/DefaultQueryManager.java
Outdated
Show resolved
Hide resolved
opensearch/src/main/java/org/opensearch/sql/opensearch/executor/OpenSearchQueryManager.java
Show resolved
Hide resolved
Signed-off-by: Peng Huo <penghuo@gmail.com>
New abstraction
QueryManager is the high level interface of the core engine, Parser parse raw query as the Plan and sumitted to QueryManager.
Core engine define the interface of QueryManager. Each execution engine should provide the implementation of QueryManager which bind to execution enviroment.
QueryManager manage all the submitted plans and define the following interface
Parser parse raw query as Statement and create AbstractPlan. Each AbstractPlan decide how to execute the query in QueryManager.
QueryService is the low level interface of core engine, each Plan decide how to execute the query and use QueryService to analyze, plan, optimize and execute the query.
Change of existing logic
a. Parser will be executed in NIO thread.
b. QueryManager decide query execution strategy. e.g. OpenSearchQueryManager schedule the QueryExecution running in sql-worker thread pool.
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.