-
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: fix "can't find column" when projection wrongly added above index lookup reader after agg pushed down #33287
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/aed46a917db614e1bad295c8c209ae7ef5e2d507 |
planner/core/integration_test.go
Outdated
@@ -6243,3 +6243,14 @@ func TestTiFlashPartitionTableScan(t *testing.T) { | |||
tk.MustExec("drop table rp_t;") | |||
tk.MustExec("drop table hp_t;") | |||
} | |||
|
|||
func TestIssue33237(t *testing.T) { |
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.
We can push these test to explain test.
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.
Updated. Moved it to explain.test
.
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.
This is a case that can be solved after projection pushdown with full built-in function support.
Now we have projection soon, but when would we have full built-in function support?
/merge |
This pull request has been accepted and is ready to merge. Commit hash: db79a6d
|
/run-cla |
/run-check-cla |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-6.0 in PR #33320 |
What problem does this PR solve?
Issue Number: close #33237
Problem Summary:
Very similar to #23804, a projection was added between the partial agg and the final agg, and the schema between them was broken.
But #23804 is for
PhysicalTableReader
, this case isPhysicalIndexLookUpReader
.What is changed and how it works?
Don't inject the extra projection if the agg was pushed down.
Check List
Tests
Side effects
Documentation
Release note