This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2e0d05e0dc [test]add gis function test case (#9888)
2e0d05e0dc is described below
commit 2e0d05e0dc2928295a29ef16b6e1607d2f2ffbb4
Author: zy-kkk <[email protected]>
AuthorDate: Wed Jun 1 08:12:34 2022 +0800
[test]add gis function test case (#9888)
---
.../spatial_functions/test_gis_function.out | 49 ++++++++++++++++++++++
.../spatial_functions/test_gis_function.groovy | 45 ++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git
a/regression-test/data/query/sql_functions/spatial_functions/test_gis_function.out
b/regression-test/data/query/sql_functions/spatial_functions/test_gis_function.out
new file mode 100644
index 0000000000..985e1ed7da
--- /dev/null
+++
b/regression-test/data/query/sql_functions/spatial_functions/test_gis_function.out
@@ -0,0 +1,49 @@
+-- This file is automatically generated. You should know what you did if you
want to edit this
+-- !sql --
+POINT (24.7 56.7)
+
+-- !sql --
+POINT (24.7 56.7)
+
+-- !sql --
+CIRCLE ((111 64), 10000)
+
+-- !sql --
+true
+
+-- !sql --
+false
+
+-- !sql --
+7336.913554999592
+
+-- !sql --
+LINESTRING (1 1, 2 2)
+
+-- !sql --
+LINESTRING (1 1, 2 2)
+
+-- !sql --
+LINESTRING (1 1, 2 2)
+
+-- !sql --
+LINESTRING (1 1, 2 2)
+
+-- !sql --
+POINT (24.7 56.7)
+
+-- !sql --
+POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
+
+-- !sql --
+POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
+
+-- !sql --
+POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
+
+-- !sql --
+24.7
+
+-- !sql --
+56.7
+
diff --git
a/regression-test/suites/query/sql_functions/spatial_functions/test_gis_function.groovy
b/regression-test/suites/query/sql_functions/spatial_functions/test_gis_function.groovy
new file mode 100644
index 0000000000..b87b0eacf4
--- /dev/null
+++
b/regression-test/suites/query/sql_functions/spatial_functions/test_gis_function.groovy
@@ -0,0 +1,45 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+suite("test_gis_function", "query") {
+ sql "set enable_vectorized_engine = true;"
+ sql "set batch_size = 4096;"
+
+ qt_sql "SELECT ST_AsText(ST_Point(24.7, 56.7));"
+ qt_sql "SELECT ST_AsWKT(ST_Point(24.7, 56.7));"
+
+ qt_sql "SELECT ST_AsText(ST_Circle(111, 64, 10000));"
+
+ qt_sql "SELECT ST_Contains(ST_Polygon(\"POLYGON ((0 0, 10 0, 10 10, 0 10,
0 0))\"), ST_Point(5, 5));"
+ qt_sql "SELECT ST_Contains(ST_Polygon(\"POLYGON ((0 0, 10 0, 10 10, 0 10,
0 0))\"), ST_Point(50, 50));"
+
+ qt_sql "SELECT ST_DISTANCE_SPHERE(116.35620117, 39.939093, 116.4274406433,
39.9020987219);"
+
+ qt_sql "SELECT ST_AsText(ST_GeometryFromText(\"LINESTRING (1 1, 2 2)\"));"
+ qt_sql "SELECT ST_AsText(ST_GeomFromText(\"LINESTRING (1 1, 2 2)\"));"
+
+ qt_sql "SELECT ST_AsText(ST_LineFromText(\"LINESTRING (1 1, 2 2)\"));"
+ qt_sql "SELECT ST_AsText(ST_LineStringFromText(\"LINESTRING (1 1, 2
2)\"));"
+
+ qt_sql "SELECT ST_AsText(ST_Point(24.7, 56.7));"
+
+ qt_sql "SELECT ST_AsText(ST_Polygon(\"POLYGON ((0 0, 10 0, 10 10, 0 10, 0
0))\"));"
+ qt_sql "SELECT ST_AsText(ST_PolyFromText(\"POLYGON ((0 0, 10 0, 10 10, 0
10, 0 0))\"));"
+ qt_sql "SELECT ST_AsText(ST_PolygonFromText(\"POLYGON ((0 0, 10 0, 10 10,
0 10, 0 0))\"));"
+
+ qt_sql "SELECT ST_X(ST_Point(24.7, 56.7));"
+ qt_sql "SELECT ST_Y(ST_Point(24.7, 56.7));"
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]