-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix query fail when there is extra table id column and late materiali…
- Loading branch information
1 parent
06e24ee
commit 27eb2ed
Showing
4 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
tests/fullstack-test/mpp/late_materialization_extra_table_id_column.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright 2023 PingCAP, Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
mysql> drop table if exists test.t; | ||
mysql> create table test.t(id int, age int, t time, key(id)) partition by range(id) ( partition p0 values less than (100), partition p1 values less than (200), partition p2 values less than (300)); | ||
mysql> insert into test.t values (1, 10, '700:11:11.1234'), (10, 11, '700:11:11.1234'); | ||
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> alter table test.t set tiflash replica 1; | ||
|
||
func> wait_table test t | ||
|
||
mysql> select count(*) from test.t; | ||
+----------+ | ||
| count(*) | | ||
+----------+ | ||
| 16384 | | ||
+----------+ | ||
|
||
mysql> analyze table test.t; | ||
|
||
mysql> begin; set @@session.tidb_isolation_read_engines='tiflash'; set @@session.tidb_partition_prune_mode='dynamic'; insert into test.t values (11, 10, '700:11:11.1234'), (12, 11, '710:11:11.1234'); select * from test.t where id > 10; select hour(t) as hour, sum(age) from test.t where id > 10 group by hour; commit; | ||
+------+------+-----------+ | ||
| id | age | t | | ||
+------+------+-----------+ | ||
| 11 | 10 | 700:11:11 | | ||
| 12 | 11 | 710:11:11 | | ||
+------+------+-----------+ | ||
+------+----------+ | ||
| hour | sum(age) | | ||
+------+----------+ | ||
| 710 | 11 | | ||
| 700 | 10 | | ||
+------+----------+ | ||
|
||
mysql> drop table test.t; |
2 changes: 1 addition & 1 deletion
2
tests/fullstack-test/mpp/late_materialization_generate_column.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters