Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions tests/tidb-ci/fullstack-test-dt/aggregation_push_down.test
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,58 @@ mysql> use test; set @@tidb_allow_mpp=1; select -1.2 from t group by id;
| -1.2 |
| -1.2 |
+------+

mysql> drop table if exists test.t;
mysql> create table test.t (value decimal(1,0));
mysql> alter table test.t set tiflash replica 1;
mysql> insert into test.t values(9);
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> insert into test.t select * from test.t;
mysql> analyze table test.t;

func> wait_table test t

mysql> use test; set @@tidb_allow_mpp=0; select avg(value) from test.t group by value;
+------------+
| avg(value) |
+------------+
| 9.0000 |
+------------+

mysql> use test; set @@tidb_allow_mpp=1; set @@tidb_enforce_mpp=1; select avg(value) from test.t group by value;
+------------+
| avg(value) |
+------------+
| 9.0000 |
+------------+

mysql> use test; set @@tidb_allow_mpp=0; select avg(value) from test.t;
+------------+
| avg(value) |
+------------+
| 9.0000 |
+------------+

mysql> use test; set @@tidb_allow_mpp=1; set @@tidb_enforce_mpp=1; select avg(value) from test.t;
+------------+
| avg(value) |
+------------+
| 9.0000 |
+------------+

mysql> drop table if exists test.t;