mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Add test
This commit is contained in:
parent
0b6391d565
commit
2a433112ee
@ -0,0 +1,11 @@
|
||||
-- { echoOn }
|
||||
SELECT readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)');
|
||||
[(1,1),(2,2),(3,3),(1,1)]
|
||||
SELECT toTypeName(readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)'));
|
||||
LineString
|
||||
SELECT wkt(readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)'));
|
||||
LINESTRING(1 1,2 2,3 3,1 1)
|
||||
-- Native Array(Tuple(Float64, Float64)) is threated as Ring, not as LineString.
|
||||
WITH wkt(CAST([(1, 1), (2, 2), (3, 3)], 'Array(Tuple(Float64, Float64))')) as x
|
||||
SELECT x, toTypeName(x), readWKTRing(x) as y, toTypeName(y);
|
||||
POLYGON((1 1,2 2,3 3)) String [(1,1),(2,2),(3,3)] Ring
|
8
tests/queries/0_stateless/03164_linestring_geometry.sql
Normal file
8
tests/queries/0_stateless/03164_linestring_geometry.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- { echoOn }
|
||||
SELECT readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)');
|
||||
SELECT toTypeName(readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)'));
|
||||
SELECT wkt(readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)'));
|
||||
|
||||
-- Native Array(Tuple(Float64, Float64)) is threated as Ring, not as LineString.
|
||||
WITH wkt(CAST([(1, 1), (2, 2), (3, 3)], 'Array(Tuple(Float64, Float64))')) as x
|
||||
SELECT x, toTypeName(x), readWKTRing(x) as y, toTypeName(y);
|
Loading…
Reference in New Issue
Block a user