Skip to content

ST_Distance returning incorrect result with DuckDB 1.3.1 #616

Open
@cpcloud

Description

@cpcloud

Setup code

# the URL is public
curl -OLsS 'https://storage.googleapis.com/ibis-pins/zones/20240322T150549Z-b1ed0/zones.geojson'
install spatial;
load spatial;
set variable penn_station = ST_Point(986345.399, 211974.446);

DuckDB 1.2.2

D select ST_Distance(geom, getvariable('penn_station')) as dist from st_read('./zones.geojson') where lower(zone) = 'flushing';
┌───────────────────┐
│       dist        │
│      double       │
├───────────────────┤
│ 42715.16463868837 │
└───────────────────┘

DuckDB 1.3.0

D select ST_Distance(geom, getvariable('penn_station')) as dist from st_read('./zones.geojson') where lower(zone) = 'flushing';
┌───────────────────┐
│       dist        │
│      double       │
├───────────────────┤
│ 42715.16463868837 │
└───────────────────┘

DuckDB 1.3.1

D select ST_Distance(geom, getvariable('penn_station')) as dist from st_read('./zones.geojson') where lower(zone) = 'flushing';
┌────────┐
│  dist  │
│ double │
├────────┤
│  0.0   │
└────────┘

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions