Skip to content

Internal error when pushdown agg into partitionUnion #29705

@wshwsh12

Description

@wshwsh12

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)

MySQL [test]> SELECT COUNT(1) FROM ( SELECT COUNT(1)  FROM t b GROUP BY id) a;
+----------+
| COUNT(1) |
+----------+
|        1 |
+----------+
1 row in set (0.000 sec)

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

Metadata

Metadata

Assignees

Labels

affects-5.0This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.component/tablepartitionThis issue is related to Table Partition of TiDB.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions