ClickHouse/tests/performance/point_in_polygon.xml

14 lines
507 B
XML
Raw Normal View History

<test>
<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))]
2020-05-22 13:51:04 +00:00
FROM numbers(100000)
</create_query>
<query>SELECT pointInPolygon((100, 100), polygon) FROM polygons</query>
<drop_query>DROP TABLE IF EXISTS polygons</drop_query>
</test>