From 2e41d1859df91a2f56c216413f3e6ee4c1d962fd Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Fri, 23 Apr 2021 18:21:34 +0300 Subject: [PATCH] add test with aggregation --- .../0_stateless/01568_window_functions_distributed.reference | 5 +++++ .../0_stateless/01568_window_functions_distributed.sql | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tests/queries/0_stateless/01568_window_functions_distributed.reference b/tests/queries/0_stateless/01568_window_functions_distributed.reference index 7355cfc8dd6..29d3e5ea885 100644 --- a/tests/queries/0_stateless/01568_window_functions_distributed.reference +++ b/tests/queries/0_stateless/01568_window_functions_distributed.reference @@ -44,4 +44,9 @@ select distinct sum(number) over w, max(number) over w from remote('127.0.0.{1,2 6 2 24 5 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; diff --git a/tests/queries/0_stateless/01568_window_functions_distributed.sql b/tests/queries/0_stateless/01568_window_functions_distributed.sql index 277c951e898..7d9d1ea5c92 100644 --- a/tests/queries/0_stateless/01568_window_functions_distributed.sql +++ b/tests/queries/0_stateless/01568_window_functions_distributed.sql @@ -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); +-- 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;