[SPARK-58769][SQL][FOLLOWUP] Clarify the BoundFunction equality contract - #58363
Closed
szehon-ho wants to merge 1 commit into
Closed
[SPARK-58769][SQL][FOLLOWUP] Clarify the BoundFunction equality contract#58363szehon-ho wants to merge 1 commit into
szehon-ho wants to merge 1 commit into
Conversation
Member
Author
|
cc @peter-toth , i think we miswrote the javadoc to say its perf problem only. Also cc @zhengruifeng who I think found this issue in post-review |
HyukjinKwon
approved these changes
Aug 27, 2026
zhengruifeng
approved these changes
Aug 28, 2026
peter-toth
approved these changes
Aug 28, 2026
peter-toth
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks for the additions.
szehon-ho
added a commit
that referenced
this pull request
Aug 28, 2026
### What changes were proposed in this pull request? Clarify the `BoundFunction.equals` documentation by: - adding valid aggregate-query rejection to the existing list of consequences when separately bound functions do not compare equal; - adding concise connector examples for stateless functions and functions with bound state; and - correcting nearby test comments that implied `UnboundFunction.bind` must return a fresh instance. ### Why are the changes needed? The current documentation says missed equality matches affect performance only. However, if repeated scalar function calls bind to distinct objects that do not compare equal, a query that selects and groups by the same call may fail with `MISSING_AGGREGATION`. Also, `UnboundFunction.bind` permits both shared and newly created bound-function instances. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Documentation and test-comment changes only. `git diff --check` passed. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex Closes #58363 from szehon-ho/codex/fix-boundfunction-javadoc. Authored-by: Szehon Ho <szehon.apache@gmail.com> Signed-off-by: Szehon Ho <szehon.apache@gmail.com> (cherry picked from commit 024120d) Signed-off-by: Szehon Ho <szehon.apache@gmail.com>
Member
Author
Member
Author
|
Thank you all! |
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 pull request?
Clarify the
BoundFunction.equalsdocumentation by:UnboundFunction.bindmust return a fresh instance.Why are the changes needed?
The current documentation says missed equality matches affect performance only. However, if repeated scalar function calls bind to distinct objects that do not compare equal, a query that selects and groups by the same call may fail with
MISSING_AGGREGATION.Also,
UnboundFunction.bindpermits both shared and newly created bound-function instances.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Documentation and test-comment changes only.
git diff --checkpassed.Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex