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

Tiflash mpp join generate physical plan failed in resolve index phase #52828

Closed
yibin87 opened this issue Apr 23, 2024 · 10 comments · Fixed by #52836
Closed

Tiflash mpp join generate physical plan failed in resolve index phase #52828

yibin87 opened this issue Apr 23, 2024 · 10 comments · Fixed by #52836
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@yibin87
Copy link
Contributor

yibin87 commented Apr 23, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test; DROP TABLE IF EXISTS B;
use test; CREATE TABLE B (col_int int(11) DEFAULT NULL, col_datetime_not_null datetime NOT NULL, col_int_not_null int(11) NOT NULL, col_decimal_not_null decimal(10,0) NOT NULL);
alter table test.B set tiflash replica 1;
use mpp_complex_sql1000; INSERT INTO B VALUES (0,'2001-09-16 00:00:00',1,1622212608);
use test; DROP TABLE IF EXISTS C;
use test; CREATE TABLE C (pk int(11) NOT NULL, col_decimal_not_null decimal(10,0) NOT NULL);
alter table test.C set tiflash replica 1;
use test; INSERT INTO C VALUES (30,-636485632); INSERT INTO C VALUES (50,-1094713344);
use test; DROP TABLE IF EXISTS DD;
use test; CREATE TABLE DD (col_varchar_10 varchar(10) DEFAULT NULL, col_varchar_10_not_null varchar(10) NOT NULL, pk int(11), col_int_not_null int(11) NOT NULL);
alter table test.DD set tiflash replica 1;
use test; INSERT INTO DD VALUES ('','t',1,-1823473664); INSERT INTO DD VALUES ('for','p',2,1150025728); INSERT INTO DD VALUES ('p''',3,2014511104); INSERT INTO DD VALUES ('y','this',4,0); INSERT INTO DD VALUES ('y','w',5,-510132224);
analyze table B;
analyze table C;
analyze table DD;
use test; set @@tidb_isolation_read_engines='tiflash,tidb'; set @@tidb_broadcast_join_threshold_size=0; set @@tidb_broadcast_join_threshold_count=0; SELECT MAX( OUTR . col_int ) AS X FROM C AS OUTR2 INNER JOIN B AS OUTR ON ( OUTR2 . col_decimal_not_null = OUTR . col_decimal_not_null AND OUTR2 . pk = OUTR . col_int_not_null ) WHERE OUTR . col_decimal_not_null IN ( SELECT INNR . col_int_not_null + 1 AS Y FROM DD AS INNR WHERE INNR . pk > INNR . pk OR INNR . col_varchar_10_not_null >= INNR . col_varchar_10 ) GROUP BY OUTR . col_datetime_not_null;

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

Run without error

3. What did you see instead (Required)

ERROR 1105 (HY000): Can't find column test.c.col_decimal_not_null in schema Column: [test.b.col_int,test.b.col_datetime_not_null,test.b.col_decimal_not_null] Unique key: []

4. What is your TiDB version? (Required)

Edition: Community
Git Commit Hash: 8f138d5
Git Branch: HEAD
UTC Build Time: 2024-04-22 08:00:01
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv |

@yibin87 yibin87 added the type/bug The issue is confirmed as a bug. label Apr 23, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/cc @yibin87

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/label severity major

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/severity major

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-5.4

@ti-chi-bot ti-chi-bot bot removed the may-affects-5.4 This bug maybe affects 5.4.x versions. label Apr 23, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-6.1

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-6.5

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-7.1

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-7.5

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/remove-label may-affects-8.1

@yibin87
Copy link
Contributor Author

yibin87 commented Apr 23, 2024

/sig execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant