2021-03-25 21:00:18 +00:00
|
|
|
<test>
|
2020-05-18 04:55:06 +00:00
|
|
|
<query>SELECT sum(number) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toUInt32(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toUInt16(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toUInt8(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toFloat32(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toFloat64(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sumKahan(toFloat32(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sumKahan(toFloat64(number)) FROM numbers(100000000)</query>
|
|
|
|
|
|
|
|
<query>SELECT sum(toNullable(number)) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toNullable(toUInt32(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toNullable(toUInt16(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toNullable(toUInt8(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toNullable(toFloat32(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sum(toNullable(toFloat64(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sumKahan(toNullable(toFloat32(number))) FROM numbers(100000000)</query>
|
|
|
|
<query>SELECT sumKahan(toNullable(toFloat64(number))) FROM numbers(100000000)</query>
|
2021-09-11 20:37:45 +00:00
|
|
|
|
|
|
|
<!-- Create a table with ~20% null values. Make it random so the branch predictor doesn't do all the work -->
|
|
|
|
<create_query>CREATE TABLE nullfloat32 (x Nullable(Float32)) ENGINE = Memory</create_query>
|
|
|
|
<fill_query>INSERT INTO nullfloat32
|
|
|
|
SELECT IF(rand() % 5 == 0, NULL::Nullable(Float32), toFloat32(number)) as x
|
|
|
|
FROM numbers_mt(200000000)
|
|
|
|
SETTINGS max_threads = 8
|
|
|
|
</fill_query>
|
2021-09-21 19:19:13 +00:00
|
|
|
<query short="1">SELECT sum(x) FROM nullfloat32</query>
|
|
|
|
<query short="1">SELECT sum(x::Nullable(Float64)) FROM nullfloat32</query>
|
2021-09-11 20:37:45 +00:00
|
|
|
<drop_query>DROP TABLE IF EXISTS nullfloat32</drop_query>
|
2020-05-18 04:55:06 +00:00
|
|
|
</test>
|