-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
tests/queries/0_stateless/03123_analyzer_dist_join_CTE.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1 10 1 1 | ||
2 12 2 2 |
28 changes: 28 additions & 0 deletions
28
tests/queries/0_stateless/03123_analyzer_dist_join_CTE.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- https://github.com/ClickHouse/ClickHouse/issues/22923 | ||
SET allow_experimental_analyzer=1; | ||
SET prefer_localhost_replica=0; | ||
|
||
create table "t0" (a Int64, b Int64) engine = MergeTree() partition by a order by a; | ||
|
||
create table "dist_t0" (a Int64, b Int64) engine = Distributed(test_shard_localhost, currentDatabase(), t0); | ||
|
||
insert into t0 values (1, 10), (2, 12); | ||
|
||
SELECT * FROM ( | ||
WITH | ||
b AS | ||
( | ||
SELECT toInt64(number) AS a | ||
FROM numbers(10) | ||
), | ||
c AS | ||
( | ||
SELECT toInt64(number) AS a | ||
FROM numbers(10) | ||
) | ||
SELECT * | ||
FROM dist_t0 AS a | ||
LEFT JOIN b AS b ON a.a = b.a | ||
LEFT JOIN c AS c ON a.a = c.a | ||
) | ||
ORDER BY ALL; |