Skip to content

st_read with only non-geometry columns still reads geometry #836

Description

@bartzwemmer

A bit of an edge case I ran into. We received data as geopackage, with Curve geometries. This can not be read by DuckDB spatial. I used ogr2ogr to converth the GPKG file to a GeoParquet file, which works fine (although curve support would be awesome). Then I wan to do a simple count of the numbers of records, to be sure the conversion worked:

SELECT COUNT(fid) FROM st_read('my-geopackage.gpkg')

The fid column is an integer column. In this scenario, there is no need to read the geometry of the geopackage. Yet it throws the following error:
Exception has occurred: InvalidInputException Invalid Input Error: Unsupported geometry type in WKB. It would be nice if the query could still work and I think it would enhance performance if st_read only reads geometry when it is absolutely necessary.

I'm running this on 1.5.4 of DuckDB by the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions