zhangfengcdt opened a new pull request, #2858:
URL: https://github.com/apache/sedona/pull/2858

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor 
Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes 
#<issue_number>
   
   ## What changes were proposed in this PR?
   
     - **`ST_DWithin(A, B, d)`** — returns `true` iff the minimum geodesic 
distance between Geographies A
     and B (in meters) is `<= d`. Delegates to the existing 
`Functions.distance(Geography, Geography)`,
     which uses `S2ClosestEdgeQuery` on the two `ShapeIndexGeography`s and 
already has point-point /
     point-complex fast paths; the new `dWithin` simply compares the returned 
meters against the threshold.
      Match is inclusive (`<=`) and has no short-circuit, identical to 
`sedona-db`'s
     `s2_distance`-then-compare flow. 3-arg only — the Geometry-side 
`useSpheroid` 4th argument has no
     Geography analogue because Geography is already spherical.
   
     - **`ST_Within(A, B)`** — returns `true` iff Geography A is fully inside B 
on the sphere. Implemented
     as `contains(B, A)`, the OGC identity. The underlying `contains` path runs 
`S2BooleanOperation`
     containment over two `ShapeIndexGeography`s via the existing `Predicates` 
helper. The Catalyst
     `ST_Within` case class is migrated from `ST_Predicate + CodegenFallback` 
to `InferredExpression`
     dual-dispatch (same migration already applied to `ST_Contains`); 
`JoinQueryDetector` is updated to
     match it at the outer level with a Geography guard so spatial-join 
planning continues to skip
     Geography inputs.
   
   ## How was this patch tested?
   
     - `mvn -pl common -Dtest=FunctionTest test
     - `GeographyFunctionTest` gains SQL + DataFrame API coverage for both 
functions 
   
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation.
   


-- 
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