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

use_cascades hint works incorrectly on partition table #16896

Open
Illyrix opened this issue Apr 28, 2020 · 3 comments
Open

use_cascades hint works incorrectly on partition table #16896

Illyrix opened this issue Apr 28, 2020 · 3 comments
Labels
component/tablepartition This issue is related to Table Partition of TiDB. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/planner SIG: Planner

Comments

@Illyrix
Copy link

Illyrix commented Apr 28, 2020

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

execute:

create table t(id int not null auto_increment, col_int int not null, col_float float, primary key(id, col_int)) partition by range(col_int) (partition p0 values less than (100), partition pn values less than (MAXVALUE));
insert into t values(1, 10, 1), (101, 100, 101);

SELECT /*+ use_cascades(TRUE)*/ * from t;

2. What did you expect to see?

same result as normal select statement:

SELECT * from t;
+-----+---------+-----------+
| id  | col_int | col_float |
+-----+---------+-----------+
| 101 |     100 |       101 |
|   1 |      10 |         1 |
+-----+---------+-----------+
2 rows in set (0.00 sec)

3. What did you see instead?

SELECT /*+ use_cascades(TRUE)*/ * from t;
Empty set (0.00 sec)

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

5.7.25-TiDB-v4.0.0-beta.2-305-g94011e606

SIG slack channel

#sig-planner

Score

  • 300

Mentor

@Illyrix Illyrix added the type/bug The issue is confirmed as a bug. label Apr 28, 2020
@zz-jason zz-jason added the sig/planner SIG: Planner label Apr 28, 2020
@siddontang
Copy link
Member

Great catch!!!

@francis0407
Copy link
Member

This is because cascades planner is still under development. And partition table hasn't been supported yet.

@lzmhhh123 lzmhhh123 added challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Oct 30, 2020
@XuHuaiyu XuHuaiyu added type/feature-request Categorizes issue or PR as related to a new feature. and removed severity/moderate type/bug The issue is confirmed as a bug. labels Dec 10, 2020
@Enochack
Copy link
Contributor

/assign

@zz-jason zz-jason removed challenge-program type/feature-request Categorizes issue or PR as related to a new feature. labels Apr 21, 2021
@Enochack Enochack removed their assignment May 25, 2021
@Reminiscent Reminiscent added the component/tablepartition This issue is related to Table Partition of TiDB. label Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/planner SIG: Planner
Projects
None yet
Development

No branches or pull requests

9 participants