ClickHouse/tests/queries/0_stateless/02681_aggregation_by_partitions_bug.sql
2023-03-29 23:59:39 +02:00

11 lines
315 B
SQL

-- Tags: no-random-merge-tree-settings
set max_threads = 16;
create table t(a UInt32) engine=MergeTree order by tuple() partition by a % 16;
insert into t select * from numbers_mt(1e6);
set allow_aggregate_partitions_independently=1, force_aggregate_partitions_independently=1;
select count(distinct a) from t;