Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_Read_Meta() mismatch type error on repeated calls (Windows) #472

Open
meztez opened this issue Dec 30, 2024 · 0 comments
Open

ST_Read_Meta() mismatch type error on repeated calls (Windows) #472

meztez opened this issue Dec 30, 2024 · 0 comments

Comments

@meztez
Copy link

meztez commented Dec 30, 2024

Similar to #451, repeated call will fail (on Windows this time)

CLI reprex

> duckdb
v1.1.3 19864453f7
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D FORCE INSTALL spatial FROM core_nightly;
D LOAD spatial;                                                                      
D SELECT layers[1].geometry_fields[1].crs.proj4 proj4 FROM ST_Read_Meta('test.shp');
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                  proj4                                                   │
│                                                 varchar                                                  │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ +proj=aea +lat_0=45 +lon_0=-126 +lat_1=50 +lat_2=58.5 +x_0=1000000 +y_0=0 +datum=NAD83 +units=m +no_defs │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
D SELECT layers[1].geometry_fields[1].crs.proj4 proj4 FROM ST_Read_Meta('test.shp');
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                  proj4                                                   │
│                                                 varchar                                                  │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ +proj=aea +lat_0=45 +lon_0=-126 +lat_1=50 +lat_2=58.5 +x_0=1000000 +y_0=0 +datum=NAD83 +units=m +no_defs │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
D SELECT layers[1].geometry_fields[1].crs.proj4 proj4 FROM ST_Read_Meta('test.shp');
Mismatch Type Error: Type STRUCT("name" VARCHAR, "type" VARCHAR, nullable BOOLEAN) does not match with STRUCT("name" VARCHAR, "type" VARCHAR, nullable BOOLEAN, crs STRUCT("name" VARCHAR, auth_name VARCHAR, auth_code VARCHAR, wkt VARCHAR, proj4 VARCHAR, projjson VARCHAR)). Cannot cast STRUCTs of different size
D SELECT layers[1].geometry_fields[1].crs.proj4 proj4 FROM ST_Read_Meta('test.shp');

test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant