Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did you read the Contributor Guide?
Yes, I have read the contributor rules and development guide.
Is this PR related to a ticket?
Related to #3124. This is an independent correctness fix identified while checking the existing S2 geography boundary for the native Spark port. It does not enable native types.
What changes were proposed in this PR?
ST_Distance(geography, geography) < radiusand<= radiuswere detected as planar geometry joins. Route supported comparisons through the existing spherical geography path instead.For a finite, nonnegative constant radius, a broadcast join uses the existing S2 candidate bounds and refinement. When there is no broadcast S2 path, or the bound is row-dependent, nonfinite, null, or negative, retain Spark's exact scalar join evaluation. This matters for correctness: Spark orders NaN above finite doubles, whereas S2's
dWithinrefinement does not have those comparison semantics. Row-dependent bounds can contain such values.Geometry joins, existing
ST_DWithinhandling, S2 calculations, and RDD/index serialization are unchanged. The patch changes one production file and adds one SQL regression suite. This is a correctness change; it does not claim a new partitioned geography join or a performance improvement for fallback cases.How was this patch tested?
<and<=, broadcast/nonbroadcast plans, SRIDs 4326/4269, antimeridian and polar matches, null geography, and constant/stream-side/build-side bounds including NaN and infinities.git diff --checkpassed. Tests use the existing Sedona session/Kryo configuration; no serializer modification was necessary.Did this PR include necessary documentation updates?
The planner comment explains why unsupported geography comparison bounds retain Spark's exact evaluation. No public function signature changes.