mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
Add test multiple_joins_original_names
This commit is contained in:
parent
2a9942ee80
commit
15988a220b
@ -0,0 +1,2 @@
|
|||||||
|
1
|
||||||
|
1
|
@ -0,0 +1,22 @@
|
|||||||
|
-- https://github.com/ClickHouse/ClickHouse/issues/34697
|
||||||
|
|
||||||
|
SELECT table1_id FROM (
|
||||||
|
SELECT first.table1_id
|
||||||
|
FROM (SELECT number+1 as table1_id FROM numbers(1)) as first
|
||||||
|
JOIN (SELECT number+1 as table2_id FROM numbers(1)) as second ON first.table1_id = second.table2_id
|
||||||
|
JOIN (SELECT number+1 as table3_id FROM numbers(1)) as third ON first.table1_id = third.table3_id
|
||||||
|
); -- { serverError UNKNOWN_IDENTIFIER }
|
||||||
|
|
||||||
|
SELECT table1_id FROM (
|
||||||
|
SELECT first.table1_id
|
||||||
|
FROM (SELECT number+1 as table1_id FROM numbers(1)) as first
|
||||||
|
JOIN (SELECT number+1 as table2_id FROM numbers(1)) as second ON first.table1_id = second.table2_id
|
||||||
|
JOIN (SELECT number+1 as table3_id FROM numbers(1)) as third ON first.table1_id = third.table3_id
|
||||||
|
) SETTINGS multiple_joins_try_to_keep_original_names = 1;
|
||||||
|
|
||||||
|
SELECT aaa FROM (
|
||||||
|
SELECT first.table1_id as aaa
|
||||||
|
FROM (SELECT number+1 as table1_id FROM numbers(1)) as first
|
||||||
|
JOIN (SELECT number+1 as table2_id FROM numbers(1)) as second ON first.table1_id = second.table2_id
|
||||||
|
JOIN (SELECT number+1 as table3_id FROM numbers(1)) as third ON first.table1_id = third.table3_id
|
||||||
|
) SETTINGS multiple_joins_try_to_keep_original_names = 1;
|
Loading…
Reference in New Issue
Block a user