duckdb / duckdb_spatial

MIT License
489 stars 40 forks source link

Point2D type does not work with IMPORT/EXPORT DATABASE #433

Open ammojamo opened 1 month ago

ammojamo commented 1 month ago

Steps to reproduce:

LOAD SPATIAL;
CREATE TABLE test (p POINT_2D);
INSERT INTO test (p) VALUES (ST_Point2d(0,0));
EXPORT DATABASE 'test';
DROP TABLE test;
IMPORT DATABASE 'test';

The final line produces the following error, and the data is not imported:

Conversion Error: CSV Error on Line: 2
Original Line: POINT (0 0)
Error when converting column "p". Could not convert string "POINT (0 0)" to 'POINT_2D'
ammojamo commented 1 month ago

DuckDB Version: v1.1.2 f680b7d08f MacOS 14.4.1 Installed via Homebrew