-
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: projection don't new unnecessary column #13406
Conversation
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 seems many explain tests need to change too.
21b4bf1
to
3a5dd6f
Compare
Codecov Report
@@ Coverage Diff @@
## master #13406 +/- ##
===========================================
Coverage 80.3292% 80.3292%
===========================================
Files 472 472
Lines 117311 117311
===========================================
Hits 94235 94235
Misses 15837 15837
Partials 7239 7239 |
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.
Please fix the conflicts, and the rest 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-unit-test |
@@ -84,10 +73,7 @@ func exprHasSetVarOrSleep(expr expression.Expression) bool { | |||
// If any expression has SetVar function or Sleep function, we do not prune it. | |||
func (p *LogicalProjection) PruneColumns(parentUsedCols []*expression.Column) error { |
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 seems PruneColumns
don't need to return error
.
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's a error check in Aggregation's PruneColumns
. In line 113.
a25b90e
to
1064691
Compare
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
@winoros merge failed. |
/run-all-tests |
/run-all-tests tidb-test=pr/950 |
/run-common-test tidb-test=pr/950 |
/run-common-test tidb-test=pr/950 |
1 similar comment
/run-common-test tidb-test=pr/950 |
/run-all-tests tidb-test=pr/950 |
What problem does this PR solve?
Since name is splitted from the Column.
The project don't need to new column when the expr is just a column.
This makes it possible to merge the two project eliminating process which TiDB current has.
What is changed and how it works?
If the expression is column. We use it directly, instead of new one.
Check List
Tests