zhangfengcdt commented on PR #2858:
URL: https://github.com/apache/sedona/pull/2858#issuecomment-4315050950

   Notes about sedona-db compatability: 
   
   Both implementations reduce `ST_DWithin(A, B, d)` to comparing the minimum 
geodesic distance between two geography entities using `S2ClosestEdgeQuery` 
over each side's `S2ShapeIndex`. sedona-db calls this via its C++ `s2_distance` 
helper; Sedona reuses the existing `Functions.distance(Geography, Geography)`, 
which wraps `Distance.S2_distance(ShapeIndexGeography, ShapeIndexGeography)` — 
the same S2 query, just in Java.
   
   Neither implementation short-circuits via 
`S2ClosestEdgeQuery::Options::set_max_distance`; both compute the full minimum 
and compare. Boundary semantics (`<=`), point fast paths (S1Angle for 
point-point, PointTarget for point-complex), and null propagation therefore 
line up exactly — the Java version is a thin shim over the same S2 primitive.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to