Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEDONA-688] Verify KNN parameter K must be equal or larger than 1 #1739

Merged

Conversation

zhangfengcdt
Copy link
Contributor

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

This PR add additional verification to the KNN join queries to make sure that the number of neighbors (k) must be equal or greater than 1. This is to fix the bug reported in SEDONA-688.

How was this patch tested?

The following unit test is added:
KnnJoinSuite::it("KNN Join should verify the correct parameter k is passed to the join function")

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

@jiayuasu jiayuasu added the bug label Jan 4, 2025
@jiayuasu jiayuasu added this to the sedona-1.7.1 milestone Jan 4, 2025
@jiayuasu jiayuasu merged commit 9497a07 into apache:master Jan 4, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

running ST_KNN() error : java.lang.ArithmeticException: / by zero
2 participants