-
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
Internal error when pushdown agg into partitionUnion #29705
Comments
Explain reuslt:
I debug tidb-server, and find that PartitionUnion's schema only have one Column. |
Need release in 5.1.3/5.2.3 |
PTAL @mjonss |
Fails on old/default static pruning mode, works with |
Also seems like the test case in #27798 does not trigger the issue reported in those bugs, but manually running it on a standalone tidb-server does. |
This problem is caused by tidb/planner/core/rule_column_pruning.go Lines 114 to 135 in 75f6225
Sometimes Some related PRs: |
It is easy to fix it just forcing LogicalAggregation's schema the same with it's children after pruning, but I don't know whether this way has some potential problems. I think it has related to the semantics for
|
Some ways to fix it:
|
The reason behind this is that the default |
/component tablepartition |
Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
drop table if exists t;
create table t(id int) partition by hash(id) partitions 4;
insert into t values(1);
SELECT COUNT(1) FROM ( SELECT COUNT(1) FROM t b GROUP BY id) a;
2. What did you expect to see? (Required)
3. What did you see instead (Required)
ERROR 1105 (HY000): Internal error: UnionExec chunk column count mismatch, req: 1, result: 2
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: