2020-05-22 11:46:54 +00:00
|
|
|
<test>
|
2021-04-05 10:03:29 +00:00
|
|
|
<settings>
|
|
|
|
<!--
|
|
|
|
Not sure why it's needed. Maybe it has something to do with the
|
|
|
|
resulting block size of Memory table.
|
|
|
|
-->
|
|
|
|
<optimize_trivial_insert_select>0</optimize_trivial_insert_select>
|
|
|
|
</settings>
|
|
|
|
|
2020-05-22 11:46:54 +00:00
|
|
|
<create_query>CREATE TABLE polygons (polygon Array(Array(Tuple(Float64, Float64)))) ENGINE = Memory</create_query>
|
|
|
|
<create_query>
|
|
|
|
INSERT INTO polygons
|
|
|
|
WITH number + 1 AS radius
|
|
|
|
SELECT [arrayMap(x -> (cos(x / 90. * pi()) * radius, sin(x / 90. * pi()) * radius), range(180))]
|
2021-04-02 12:14:25 +00:00
|
|
|
FROM numbers_mt(5000000)
|
2021-04-05 10:03:29 +00:00
|
|
|
SETTINGS max_insert_threads = 2, max_memory_usage = 30000000000
|
2020-05-22 11:46:54 +00:00
|
|
|
</create_query>
|
|
|
|
|
2020-06-08 22:13:08 +00:00
|
|
|
<query>SELECT pointInPolygon((100, 100), polygon) FROM polygons FORMAT Null</query>
|
2020-05-22 11:46:54 +00:00
|
|
|
|
|
|
|
<drop_query>DROP TABLE IF EXISTS polygons</drop_query>
|
|
|
|
</test>
|