-
Notifications
You must be signed in to change notification settings - Fork 411
Labels
component/computecomponent/mpptype/code-quality-improvementPR that can improve the code qualityPR that can improve the code qualitytype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
background
Currently tiflash's interpreter is designed based on DAGQueryBlock.
DAGQueryBlock is designed to coprocess read, and it can handle simple queries well.
However, there is no way to handle the complex query of MPP, so the DAGQueryBlock tree is introduced, which is a compromise that makes the code more complicated and affects the subsequent iterative development.
We need to refactor the interpreter code in a plan visit way.
design
Therefore we introduce a new abstraction layer called PhysicalPlan to replace DAGQueryBlock.
It will be responsible for the processing of ExpressionAction and the generation of BlockInputStream.
We call this organization of code the planner.
DAGRequest (executor tree or executor array).
|
|
v
physical plan <---+
| |
| | optimize
| |
+------------+
|
|
v
BlockInputStream
why planner
Most databases are designed based on planner.
- Friendly for database developers to understand code.
- We can improve tiflash with a general approach from the DB area, such as pipeline mode.
todo list
- public desgin doc
- Small refactoring of Interpreter before planner refactoring
- interpreter test framework
- planner refactory
- poc [DNM] Physical plan #4601
- Introduce
PhysicalPlan/planner, add switch and set it to planner by default - Replace all operators with
PhysicalPlan- common plans: projection/agg/filter/exchange_(sender/receiver)/limit/topn
- window function
- join
- table scan
- remove
DAGQueryBlock
- Planner: planner withoutDAGQueryBlock#5381
- merge to master
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component/computecomponent/mpptype/code-quality-improvementPR that can improve the code qualityPR that can improve the code qualitytype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.