ClickHouse/tests/performance/sum_map.xml
2020-06-08 16:57:33 +03:00

33 lines
929 B
XML

<test max_ignored_relative_change="0.3">
<settings>
<max_threads>1</max_threads>
</settings>
<substitutions>
<substitution>
<name>scale</name>
<values>
<value>1000000</value>
</values>
</substitution>
<substitution>
<name>func</name>
<values>
<value>sumMap</value>
<value>sumMapWithOverflow</value>
</values>
</substitution>
</substitutions>
<create_query>
CREATE TEMPORARY TABLE sum_map_{scale} AS
SELECT
arrayMap(x -> (x % 23), range(50)) AS key,
arrayMap(x -> intDiv(number, x + 1), range(50)) AS val
FROM numbers({scale})
</create_query>
<query>SELECT {func}(key, val) FROM sum_map_{scale} FORMAT Null</query>
<query>SELECT {func}((key, val)) FROM sum_map_{scale} FORMAT Null</query>
</test>