Skip to content
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

wrong result when aggregation on partition table #27797

Closed
time-and-fate opened this issue Sep 3, 2021 · 5 comments · Fixed by #27798
Closed

wrong result when aggregation on partition table #27797

time-and-fate opened this issue Sep 3, 2021 · 5 comments · Fixed by #27798
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. duplicate Issues or pull requests already exists. type/bug The issue is confirmed as a bug.

Comments

@time-and-fate
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
create table t(a int, b int, c int, d int) partition by range columns(d) ( partition p0 values less than (20), partition p1 values less than(40), partition p2 values less than(60));
insert into t values(1,1,1,1), (2,2,2,2), (22,22,22,22), (44,44,44,44);
set sql_mode='';
select count(*) from (select a, b from t where d > 1 and d < 60 and b > 0 group by b, c) tt;

2. What did you expect to see? (Required)

+----------+
| count(*) |
+----------+
|        3 |
+----------+
1 row in set (0.007 sec)

3. What did you see instead (Required)

ERROR 1105 (HY000): Internal error: UnionExec chunk column count mismatch, req: 3, result: 2

4. What is your TiDB version? (Required)

release 5.0, release 5.1, release 5.2, master

@time-and-fate time-and-fate added the type/bug The issue is confirmed as a bug. label Sep 3, 2021
@time-and-fate
Copy link
Member Author

Duplicated with #26554

@github-actions
Copy link

github-actions bot commented Sep 5, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'backport-x.y.z',
and then remove 'needs-more-info' label.

@time-and-fate
Copy link
Member Author

/unlabel needs-more-info

@time-and-fate
Copy link
Member Author

/remove-label needs-more-info

@ti-chi-bot
Copy link
Member

@time-and-fate: The label(s) needs-more-info cannot be applied. These labels are supported: CHANGELOG, challenge-program, compatibility-breaker, contribution, correctness, first-time-contributor, good-first-issue, hacktoberfest, high-performance, hptc, need-more-info, needs-cherry-pick-3.0, needs-cherry-pick-3.1, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, proposal, release-note, require-LGT3, security, tools.

In response to this:

/remove-label needs-more-info

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. duplicate Issues or pull requests already exists. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants