-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: set new child after injecting Project operator #9684
planner, executor: set new child after injecting Project operator #9684
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #9684 +/- ##
================================================
- Coverage 67.3879% 67.3862% -0.0018%
================================================
Files 377 377
Lines 79345 79353 +8
================================================
+ Hits 53469 53473 +4
- Misses 21104 21108 +4
Partials 4772 4772 |
@@ -205,5 +206,9 @@ func injectProjBelowSort(p PhysicalPlan, orderByItems []*ByItems) PhysicalPlan { | |||
if origChildProj, isChildProj := childPlan.(*PhysicalProjection); isChildProj { | |||
refine4NeighbourProj(bottomProj, origChildProj) | |||
} | |||
|
|||
if topProj.Schema().Len() == 0 { |
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.
Add a comment for when will this be true
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.
If the schema length is 0, is this whole plan tree below projection needed?
…son/tidb into bugfix/inject-proj-on-topn
TopN_17 1.00 root tmp.a:desc, offset:0, count:1 | ||
└─Union_21 2.00 root | ||
├─Projection_22 1.00 root cast(a) | ||
│ └─Projection_23 1.00 root 4 |
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.
If we have a rule to merge sequential Project
operators, these two Project
operator can be merged to one.
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.
If we change 33
to 3
, would this Projection_22
be removed?
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.
Yes, because in this time, FieldTypes of "3" and "4" are equal, no cast function will be added in the logical plan building phase.
/run-all-tests |
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
Please fix ci and update the description of this PR. |
/run-all-tests |
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
What problem does this PR solve?
What is changed and how it works?
do as the title said.
Check List
Tests
Code changes
Related changes