ClickHouse/tests/queries/0_stateless/02891_empty_tuple.sql
2024-06-03 16:05:44 +08:00

28 lines
637 B
SQL

drop table if exists x;
create table x engine MergeTree order by () as select () as a, () as b;
insert into x values ((), ());
select count() from x;
select * from x order by ();
select ();
drop table x;
drop table if exists x;
create table x (i Nullable(Tuple())) engine MergeTree order by (); -- { serverError 43 }
create table x (i LowCardinality(Tuple())) engine MergeTree order by (); -- { serverError 43 }
create table x (i Tuple(), j Array(Tuple())) engine MergeTree order by ();
insert into x values ((), [(), ()]), ((), []);
select count() from x;
select * from x order by () settings max_threads = 1;
drop table x;