ClickHouse/tests/performance/if_to_multiif.xml

19 lines
1.1 KiB
XML
Raw Normal View History

2019-12-30 23:57:34 +00:00
<test>
2020-03-03 10:09:47 +00:00
<preconditions>
<!-- sum() does not work for String values, need to investigate what
this test meant. Disable for now. -->
<table_exists>nonexistent_table_if_multiif</table_exists>
2020-03-07 03:19:28 +00:00
</preconditions>
2020-03-03 10:09:47 +00:00
2019-12-30 23:57:34 +00:00
2020-03-02 16:50:18 +00:00
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : 3)) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : '3')) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : (x < 10 ? 3 : (x % 2 ? 4 : 5)))) FROM numbers(1000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? '1' : (x < 5 ? '2' : (x < 10 ? '3' : (x % 2 ? '4' : '5')))) FROM numbers(1000000) ]]></query>
2020-03-07 03:19:28 +00:00
<query><![CDATA[
2020-03-02 16:50:18 +00:00
WITH number AS x, x = 1 ? 1 : (x = 2 ? 2 : (x = 3 ? 3 : (x = 4 ? 4 : (x = 5 ? 5 : (x = 6 ? 6 : (x = 7 ? 7 : (x = 8 ? 8 : (x = 9 ? 9 : (x = 10 ? 10 : (x = 11 ? 11 : (x = 12 ? 12 : (x = 13 ? 13 : (x = 14 ? 14 : (x = 15 ? 15 : (x = 16 ? 16 : (x = 17 ? 17 : (x = 18 ? 18 : (x = 19 ? 19 : 20)))))))))))))))))) AS res SELECT sum(res) FROM numbers(1000000)
2019-12-30 23:57:34 +00:00
]]></query>
</test>