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

planner: TIDB_INLJ hint cannot take effect when left joining two sub-queries #46160

Closed
qw4990 opened this issue Aug 16, 2023 · 0 comments · Fixed by #46271
Closed

planner: TIDB_INLJ hint cannot take effect when left joining two sub-queries #46160

qw4990 opened this issue Aug 16, 2023 · 0 comments · Fixed by #46271

Comments

@qw4990
Copy link
Contributor

qw4990 commented Aug 16, 2023

Enhancement

create table t1 (a int, key(a));
create table t2 (a int, key(a));

explain select /*+ tidb_inlj(bb) */ aa.* from 
(select * from t1) as aa
left join 
(select t2.a, t2.a*2 as a2 from t2) as bb
on aa.a=bb.a;

mysql> show warnings;
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                                          |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1815 | There are no matching table names for (bb) in optimizer hint /*+ INL_JOIN(bb) */ or /*+ TIDB_INLJ(bb) */. Maybe you can use the table alias name |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@qw4990 qw4990 added type/enhancement The issue or PR belongs to an enhancement. epic/hint labels Aug 16, 2023
@qw4990 qw4990 self-assigned this Aug 16, 2023
@qw4990 qw4990 added the sig/planner SIG: Planner label Aug 16, 2023
@hawkingrei hawkingrei added type/bug The issue is confirmed as a bug. and removed type/enhancement The issue or PR belongs to an enhancement. labels Aug 17, 2023
ti-chi-bot bot pushed a commit that referenced this issue Aug 21, 2023
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Aug 21, 2023
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Aug 21, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 12, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants