You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have to provide the following information whenever possible.
When having left join both inside & outside a view function, it will raise Inconsistent table names Error
A clear and concise description of what works not as it is supposed to.
How to reproduce
Which ClickHouse server version to use
ClickHouse server version 21.11.6 revision 54450
Which interface to use, if matters
Non-default settings, if any
CREATE TABLE statements for all tables involved
create table distributor (id String, name String) Engine=MergeTree() Order By id;
create table product (id String, name String) Engine=MergeTree() Order By id;
create table sales (id String, distributor String, product String, amount Float32) Engine=MergeTree() Order By id;
Queries to run that lead to unexpected result
SELECT*FROM view(
SELECT*FROM sales
LEFT JOIN distributor ONdistributor.id=sales.distributor
) AS newSales
LEFT JOIN product ONproduct.id=newSales.product
Expected behavior
query successfully executed
Error message and/or stacktrace
Received exception from server (version 21.11.6):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Inconsistent table names: While processing SELECT * FROM sales LEFT JOIN distributor ON distributor.id = sales.distributor.
Additional context
the query will successfully executed If i put both left join clause inside the view function. Same as both outside the view function.
but for some reason, i cannot do that.
The text was updated successfully, but these errors were encountered:
Algunenano
added
bug
Confirmed user-visible misbehaviour in official release
and removed
potential bug
To be reviewed by developers and confirmed/rejected.
labels
Jan 18, 2024
Code: 49. DB::Exception: Inconsistent table names: While processing SELECT * FROM sales LEFT JOIN distributor ON distributor.id = sales.distributor. (LOGICAL_ERROR)
When having left join both inside & outside a view function, it will raise Inconsistent table names Error
How to reproduce
ClickHouse server version 21.11.6 revision 54450
CREATE TABLE
statements for all tables involvedExpected behavior
query successfully executed
Error message and/or stacktrace
Received exception from server (version 21.11.6):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Inconsistent table names: While processing SELECT * FROM sales LEFT JOIN distributor ON distributor.id = sales.distributor.
Additional context
the query will successfully executed If i put both left join clause inside the view function. Same as both outside the view function.
but for some reason, i cannot do that.
The text was updated successfully, but these errors were encountered: