ClickHouse/tests/queries/0_stateless/01083_aggregation_memory_efficient_bug.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

10 lines
547 B
SQL

drop table if exists da_memory_efficient_shard;
create table da_memory_efficient_shard(A Int64, B Int64) Engine=MergeTree order by A partition by B % 2;
insert into da_memory_efficient_shard select number, number from numbers(100000);
set distributed_aggregation_memory_efficient = 1, group_by_two_level_threshold = 1, group_by_two_level_threshold_bytes=1;
select sum(a) from (SELECT B, uniqExact(A) a FROM remote('localhost,127.0.0.1', currentDatabase(), da_memory_efficient_shard) GROUP BY B);
drop table if exists da_memory_efficient_shard;