Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxxen committed Sep 6, 2024
1 parent 91ff64d commit 505e3b4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/sql/geometry/geometry_version.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Query a database with geometry types created in duckdb v1.0.0
require spatial

statement ok
attach 'test/data/duckdb_v1_0_0.db' as db;

statement ok
use db

query IIII rowsort
SELECT st_geometrytype(geom), st_astext(geom), st_isvalid(geom), st_area(geom) FROM types;
----
GEOMETRYCOLLECTION GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0, 1 1)) true 0.0
GEOMETRYCOLLECTION GEOMETRYCOLLECTION EMPTY true 0.0
LINESTRING LINESTRING (0 0, 1 1) true 0.0
LINESTRING LINESTRING EMPTY true 0.0
MULTILINESTRING MULTILINESTRING ((0 0, 1 1), (2 2, 3 3)) true 0.0
MULTILINESTRING MULTILINESTRING EMPTY true 0.0
MULTIPOINT MULTIPOINT (0 0, 1 1) true 0.0
MULTIPOINT MULTIPOINT EMPTY true 0.0
MULTIPOLYGON MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2))) true 2.0
MULTIPOLYGON MULTIPOLYGON EMPTY true 0.0
POINT POINT (0 0) true 0.0
POINT POINT EMPTY true 0.0
POLYGON POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) true 1.0
POLYGON POLYGON EMPTY true 0.0

0 comments on commit 505e3b4

Please sign in to comment.