From c63a0e88ed544c73d298ce9b677fef9000230a7f Mon Sep 17 00:00:00 2001 From: chertus Date: Thu, 12 Dec 2019 16:11:07 +0300 Subject: [PATCH] add perf test for decimal aggregates --- dbms/tests/performance/decimal_aggregates.xml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 dbms/tests/performance/decimal_aggregates.xml diff --git a/dbms/tests/performance/decimal_aggregates.xml b/dbms/tests/performance/decimal_aggregates.xml new file mode 100644 index 00000000000..f22cb89de36 --- /dev/null +++ b/dbms/tests/performance/decimal_aggregates.xml @@ -0,0 +1,45 @@ + + loop + + CREATE TABLE t (x UInt64, d32 Decimal32(3), d64 Decimal64(4), d128 Decimal128(5)) ENGINE = Memory + INSERT INTO t SELECT number AS x, x AS d32, x AS d64, x d128 FROM numbers(1000000) + DROP TABLE IF EXISTS t + + + + 10 + + + + + + + + SELECT min(d32), max(d32), argMin(x, d32), argMax(x, d32) FROM t + SELECT min(d64), max(d64), argMin(x, d64), argMax(x, d64) FROM t + SELECT min(d128), max(d128), argMin(x, d128), argMax(x, d128) FROM t + + SELECT avg(d32), sum(d32), sumWithOverflow(d32) FROM t + SELECT avg(d64), sum(d64), sumWithOverflow(d64) FROM t + SELECT avg(d128), sum(d128), sumWithOverflow(d128) FROM t + + SELECT uniq(d32), uniqCombined(d32), uniqExact(d32), uniqHLL12(d32) FROM t + SELECT uniq(d64), uniqCombined(d64), uniqExact(d64), uniqHLL12(d64) FROM t + SELECT uniq(d128), uniqCombined(d128), uniqExact(d128), uniqHLL12(d128) FROM t + + SELECT median(d32), medianExact(d32), medianExactWeighted(d32, 2) FROM t + SELECT median(d64), medianExact(d64), medianExactWeighted(d64, 2) FROM t + SELECT median(d128), medianExact(d128), medianExactWeighted(d128, 2) FROM t + + SELECT quantile(d32), quantileExact(d32), quantileExactWeighted(d32, 2) FROM t + SELECT quantile(d64), quantileExact(d64), quantileExactWeighted(d64, 2) FROM t + SELECT quantile(d128), quantileExact(d128), quantileExactWeighted(d128, 2) FROM t + + SELECT quantilesExact(0.1, 0.9)(d32), quantilesExactWeighted(0.1, 0.9)(d32, 2) FROM t + SELECT quantilesExact(0.1, 0.9)(d64), quantilesExactWeighted(0.1, 0.9)(d64, 2) FROM t + SELECT quantilesExact(0.1, 0.9)(d128), quantilesExactWeighted(0.1, 0.9)(d128, 2) FROM t + + SELECT varPop(d32), varSamp(d32), stddevPop(d32) FROM t + SELECT varPop(d64), varSamp(d64), stddevPop(d64) FROM t + SELECT varPop(d128), varSamp(d128), stddevPop(d128) FROM t +