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
planner, executor: add post-process after physical plan optimization and move buildProjBelowAgg from executor to planner #8828
Conversation
/run-all-tests |
2635771
to
2b51b39
Compare
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
f65d3e5
to
52eca3a
Compare
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
…and move buildProjBelowAgg from executor to planner
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
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.
LGTM
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.
LGTM
/run-all-tests |
|
||
// If the mode is FinalMode, we do not need to wrap cast upon the args, | ||
// since the types of the args are already the expected. | ||
if len(aggFuncs) > 0 && aggFuncs[0].Mode != aggregation.FinalMode { |
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.
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.
@eurekaka Seems you're right.
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.
Should I push another PR to fix these two problems? 🤔
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.
ok
} | ||
|
||
child := aggPlan.Children()[0] | ||
prop := aggPlan.GetChildReqProps(0).Clone() |
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.
prop
would not be used anymore since we have finished physical optimization, so we can just set it nil?
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.
It looks so
…and move buildProjBelowAgg from executor to planner (pingcap#8828)
What problem does this PR solve?
Add a post process function after DoOptimize() in package "planner/core". (#8713)
In this post process, we can:
So after this code change, the plan in explain xx is equals to explain analyze xx, and the plan generation is back to the "planner" package.
Hope this can make the code more readable and maintainable.
What is changed and how it works?
Check List
Tests
This change is