From 70d40aedc38095865c923392b64386822a135394 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 6 Jun 2015 03:43:54 +0300 Subject: [PATCH] dbms: added tests for functions of aggregation states [#METR-16677]. --- ..._functions_of_aggregation_states.reference | 20 +++++++++++++++++++ .../00166_functions_of_aggregation_states.sql | 1 + 2 files changed, 21 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.reference create mode 100644 dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.sql diff --git a/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.reference b/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.reference new file mode 100644 index 00000000000..d5b108ae223 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.reference @@ -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 diff --git a/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.sql b/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.sql new file mode 100644 index 00000000000..b73a04e19b9 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00166_functions_of_aggregation_states.sql @@ -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);