mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 22:12:21 +00:00
20 lines
656 B
SQL
20 lines
656 B
SQL
-- https://github.com/ClickHouse/ClickHouse/issues/63833
|
|
SET allow_experimental_analyzer = 1;
|
|
|
|
create table Example (id Int32) engine = MergeTree ORDER BY id;
|
|
INSERT INTO Example SELECT number AS id FROM numbers(2);
|
|
|
|
create table Null engine=Null as Example ;
|
|
--create table Null engine=MergeTree order by id as Example ;
|
|
|
|
create materialized view Transform to Example as
|
|
select * from Null
|
|
join ( select * FROM Example
|
|
WHERE id IN (SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM Null)))))
|
|
) as old
|
|
using id;
|
|
|
|
INSERT INTO Null SELECT number AS id FROM numbers(2);
|
|
|
|
select * from Example; -- should return 4 rows
|