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.
What changes were proposed in this PR?
Computed geometry operands in
ST_KNN, such asST_Buffer(q.geom, ...), can fail with an attribute-binding error. The physical join currently chooses the query input by searching its printed plan for the expression text. A computed expression need not appear in that input plan, so the join can select the wrong side.Match both operands using their referenced attribute identities, consistent with the logical planner. This covers partitioned KNN and both broadcast orientations, preserves original left/right output rows, and retains the existing rejection of reference-free operands. The KNN algorithms, partitioning, and serializers are unchanged.
How was this patch tested?
20efe7d4c4f, the new Spark 4.1 regression suite ran 16 cases: four computed-geometry cases reproducedINTERNAL_ERROR_ATTRIBUTE_NOT_FOUND; the other 12 controls passed.KnnJoinSuitecases passed on Spark 4.1.1 / Scala 2.13 and on a clean Spark 3.5.8 / Scala 2.12 build (192 passing checks total).verifyincluded Spotless and Scalastyle; repository pre-commit and commit hooks passed.Did this PR include necessary documentation updates?
No public API changes; no documentation changes are needed.