zhangfengcdt opened a new pull request, #2871: URL: https://github.com/apache/sedona/pull/2871
## 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? Common cases for all four newly-wired predicates follow the same pattern as from the ST_Contains foundation: - Coarse filter is the JTS STR-tree on lat/lng envelopes (with antimeridian → full-longitude wrap), built once per broadcast. - S2 ShapeIndex caching is lazy on the build-side WKBGeography instances — first refinement query builds the index, subsequent queries reuse it. - Without a broadcast hint and with autoBroadcastJoinThreshold=-1 (test default) For ST_DWithin: - Build-side index: New toExpandedGeographyEnvelopeRDD: using Haversine.expandEnvelope(env, distance, polarRadius=6_357_000m) with 10% margin & pole-snap. - Per-row distance carried in GeographyJoinShape.radius. - Stream-side shape: New stream branch in createStreamShapes: same expansion, same GeographyJoinShape(geog, row, radius) payload. - Refiner: GeographyDistanceRefiner(swap) → Functions.dWithin(a, b, streamRadius) (S2 closest-edge query). ## How was this patch tested? New tests are added for each join type ## Did this PR include necessary documentation updates? - No, this PR does not affect any public API so no need to change 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]
