ClickHouse/tests/queries/0_stateless/03231_dynamic_uniq_group_by.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
726 B
MySQL
Raw Normal View History

set allow_experimental_dynamic_type = 1;
2024-09-30 13:57:19 +00:00
set allow_suspicious_types_in_group_by = 1;
set allow_suspicious_types_in_order_by = 1;
drop table if exists test;
create table test (d Dynamic(max_types=2)) engine=Memory;
insert into test values (42), ('Hello'), ([1,2,3]), ('2020-01-01');
insert into test values ('Hello'), ([1,2,3]), ('2020-01-01'), (42);
insert into test values ([1,2,3]), ('2020-01-01'), (42), ('Hello');
insert into test values ('2020-01-01'), (42), ('Hello'), ([1,2,3]);
insert into test values (42);
insert into test values ('Hello');
insert into test values ([1,2,3]);
insert into test values ('2020-01-01');
select uniqExact(d) from test;
select count(), d from test group by d order by d;
drop table test;