From e60fee3f3d537356bfedb5e7a8b7f680f2d5c6cf Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 22 May 2020 14:46:54 +0300 Subject: [PATCH] Add performance test for non-constant polygons --- tests/performance/point_in_polygon.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/performance/point_in_polygon.xml diff --git a/tests/performance/point_in_polygon.xml b/tests/performance/point_in_polygon.xml new file mode 100644 index 00000000000..06e59f13a13 --- /dev/null +++ b/tests/performance/point_in_polygon.xml @@ -0,0 +1,13 @@ + + CREATE TABLE polygons (polygon Array(Array(Tuple(Float64, Float64)))) ENGINE = Memory + + INSERT INTO polygons + WITH number + 1 AS radius + SELECT [arrayMap(x -> (cos(x / 90. * pi()) * radius, sin(x / 90. * pi()) * radius), range(180))] + FROM numbers(1000) + + + SELECT pointInPolygon((100, 100), polygon) FROM polygons + + DROP TABLE IF EXISTS polygons +