-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: donot prune all columns for Projection #24024
planner: donot prune all columns for Projection #24024
Conversation
cdc7df2
to
46f1532
Compare
7188b06
to
57d4fa3
Compare
/run-all-tests |
9f1aaf7
to
5e14d5a
Compare
@winoros @lzmhhh123 PTAL |
As @lzmhhh123 suggested, I'm trying to make it |
5e14d5a
to
6e33207
Compare
/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.
How about adding some tests? BTW, can we avoid pruning projection in tryEliminateProjection
?
@winoros PTAL the PR. Do you have any better way to solve the issue? |
You mean we do not eliminate Maybe we can not do that because this PR |
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.
tryEliminateProjection
You mean we do not eliminate
Projection
whose output column is empty?Maybe we can not do that because this PR
No, we can check whether a join above it.
I think this bug is not only for Join, for example,
You can repeat this bug use following SQL(I will add it to testcase):
|
2154047
to
b6cd2e5
Compare
/run-cla |
Signed-off-by: guo-shaoge <shaoge1994@163.com>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 037b140
|
/run-unit-test |
/run-all-tests |
/run-mybatis-test |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #24092 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #24093 |
… (pingcap#24093)" This reverts commit f5cac30. Signed-off-by: guo-shaoge <shaoge1994@163.com>
This reverts commit 4cd7fb0.
Signed-off-by: guo-shaoge shaoge1994@163.com
What problem does this PR solve?
Issue Number: close #23887
Problem Summary:
Projection
col1
, Its index is 0(becauseProjection
's output columns are all pruned)Projection
is eliminated, because its output columns are all pruned. But Index Join still has output columnseq("abc", tbl1.col1)
. Because use index 0 to eval tbl1.col1What is changed and how it works?
What's Changed:
Projection
. IfProjection
is pruned to empty, we make it aProjection 1
(just like count(1))rule_eliminate_projection.go
, because Projection cannot be empty. Check hereRelated changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects: no
Release note