QueryManager is the high level interface of the core engine, Parser parse raw query as the Plan and sumitted to QueryManager.
- AstBuilder analyze raw query string and create Statement.
- QueryPlanFactory create Plan for different Statement.
- QueryManager execute Plan.
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
- submit: submit queryexecution.
- cancel: cancel query execution.
- get: get query execution info of specific query.
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.
- Remove the schedule logic in NIO thread. After the change, 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.