Skip to content

[BUG] Three-level join,'all' ='all' as the join condition of the second level, an error is reported #5863

@xinyiZzz

Description

@xinyiZzz

Describe the bug

Error query:

select b.C_NATION
from A 	a
join B 	b on a.D_DATEKEY = b.C_CITY
join C 	c on b.C_CUSTKEY = c.P_PARTKEY and 'all' = 'all'
join D 	d on c.P_PARTKEY = d.S_SUPPKEY
limit 0;

>  ERROR 1054 (42S22): errCode = 2, detailMessage = Unknown column 'C_CUSTKEY' in 'b'

Remove'all' ='all'to succeed:

select b.C_NATION
from A 	a
join B 	b on a.D_DATEKEY = b.C_CITY
join C 	c on b.C_CUSTKEY = c.P_PARTKEY
join D 	d on c.P_PARTKEY = d.S_SUPPKEY
limit 0;

Note that the 4 tables in the above query need to have data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions