Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 【提问】101这个图里sql parse和compile是不是有点问题啊
In the image, the AST is output during the preprocess stage of the compile module, but according to the documentation, it should be output by the parse interface. Is there a problem with the PPT?
Don’t worry about these details, once you finish learning, you won’t need them anymore 
It’s because I had this question in the PCTA exam the day before yesterday. Although I passed, I checked it again after the exam and I’m still not quite sure 
Not just this issue, the time to obtain TSO in the diagram is also incorrect. TSO should be obtained during the execution phase.
Both stages involve AST processing, but the details are different.
During compilation, statistical information is added. Preprocessing will decompose the AST from the previous parsing step into two different processing rules:
- PointGet BatchPointGet
- QueryGet operator pushdown, etc.
The optimization directions will also differ.