dbms: added tests for functions of aggregation states [#METR-16677].

This commit is contained in:
Alexey Milovidov 2015-06-06 03:43:54 +03:00
parent 417ab909b8
commit 70d40aedc3
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
0 1249975000 1249975000
1 3749975000 4999950000
2 6249975000 11249925000
3 8749975000 19999900000
4 11249975000 31249875000
5 13749975000 44999850000
6 16249975000 61249825000
7 18749975000 79999800000
8 21249975000 101249775000
9 23749975000 124999750000
10 26249975000 151249725000
11 28749975000 179999700000
12 31249975000 211249675000
13 33749975000 244999650000
14 36249975000 281249625000
15 38749975000 319999600000
16 41249975000 361249575000
17 43749975000 404999550000
18 46249975000 451249525000
19 48749975000 499999500000

View File

@ -0,0 +1 @@
SELECT k, finalizeAggregation(sum_state), runningAccumulate(sum_state) FROM (SELECT intDiv(number, 50000) AS k, sumState(number) AS sum_state FROM (SELECT number FROM system.numbers LIMIT 1000000) GROUP BY k ORDER BY k);