You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2026/07/27 01:35:24 UTC
[I] Add Geography support for ST_KNN [sedona]
jiayuasu opened a new issue, #3178:
URL: https://github.com/apache/sedona/issues/3178
## What's missing
`ST_KNN` is geometry-only, so a k-nearest-neighbour join cannot rank candidates by geodesic
distance over geography columns.
```sql
-- wanted
SELECT ... FROM trips t JOIN buildings b ON ST_KNN(t.geog, b.geog, 5);
```
For geography, spherical ranking is the definition rather than an option, so a 3-argument
signature seems the natural one — the geometry overload's `use_spheroid` flag has no meaning
when the inputs are already geographic.
## Why
This blocks the geography form of SpatialBench Q12, which ranks trip pickups by the average
distance to their five nearest buildings. It is the only one of the twelve SpatialBench
queries with no geography formulation on any engine today, so it is defined in the docs but
not carried in the runnable suite: https://github.com/apache/sedona-spatialbench/blob/main/spatialbench-queries/print_geography_queries.py
## Note
SedonaDB does not have this either — tracked as apache/sedona-db#1086 — so the two engines are
in the same position here.
Part of https://github.com/apache/sedona/issues/2830.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Geography support for ST_KNN [sedona]
Posted by "Mayukh-D (via GitHub)" <gi...@apache.org>.
Mayukh-D commented on issue #3178:
URL: https://github.com/apache/sedona/issues/3178#issuecomment-6079682322
Hi, I'd like to pick this up if it's still open.
I'm a student contributing as part of a university software engineering course, working with three classmates who are looking at separate issues elsewhere in the repo. We're treating this as real contribution rather than a drive-by, so we'd rather check our approach with you before opening anything.
I've read #3319, which was withdrawn by its author the same day without review, so I don't have a sense of whether the approach there was along the right lines. Before writing code I'd want to confirm the intended signature: the issue describes a 3-argument form for geography, where spherical ranking is the definition rather than an option. Is that still how you'd want it exposed, and should the geometry and geography paths share a ranking implementation or stay separate?
Happy to be pointed elsewhere if this one is spoken for, or if it's a poor fit for an outside contributor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Geography support for ST_KNN [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on issue #3178:
URL: https://github.com/apache/sedona/issues/3178#issuecomment-6137905679
@Mayukh-D please work on issues marked as "Good first issues"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Geography support for ST_KNN [sedona]
Posted by "Mayukh-D (via GitHub)" <gi...@apache.org>.
Mayukh-D commented on issue #3178:
URL: https://github.com/apache/sedona/issues/3178#issuecomment-6209647324
Thanks, makes sense. I'll pick up a good first issue instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org