2024-04-11 22:22:18 +00:00
|
|
|
-- https://github.com/ClickHouse/ClickHouse/issues/22923
|
2024-07-12 12:49:26 +00:00
|
|
|
SET enable_analyzer=1;
|
2024-04-11 22:22:18 +00:00
|
|
|
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;
|