add test with aggregation

This commit is contained in:
Alexander Kuzmenkov 2021-04-23 18:21:34 +03:00
parent 6982ab5324
commit 2e41d1859d
2 changed files with 8 additions and 0 deletions

View File

@ -44,4 +44,9 @@ select distinct sum(number) over w, max(number) over w from remote('127.0.0.{1,2
6 2 6 2
24 5 24 5
42 8 42 8
-- window functions + aggregation w/shards
select groupArray(groupArray(number)) over (rows unbounded preceding) from remote('127.0.0.{1,2}', '', t_01568) group by mod(number, 3);
[[0,3,6,0,3,6]]
[[0,3,6,0,3,6],[1,4,7,1,4,7]]
[[0,3,6,0,3,6],[1,4,7,1,4,7],[2,5,8,2,5,8]]
drop table t_01568; drop table t_01568;

View File

@ -17,4 +17,7 @@ select sum(number) over w, max(number) over w from remote('127.0.0.{1,2}', '', t
select distinct sum(number) over w, max(number) over w from remote('127.0.0.{1,2}', '', t_01568) window w as (partition by p); select distinct sum(number) over w, max(number) over w from remote('127.0.0.{1,2}', '', t_01568) window w as (partition by p);
-- window functions + aggregation w/shards
select groupArray(groupArray(number)) over (rows unbounded preceding) from remote('127.0.0.{1,2}', '', t_01568) group by mod(number, 3);
drop table t_01568; drop table t_01568;