[SPARK-56661] Addressing review comments from PR #55768#56367
Closed
sven-weber-db wants to merge 1 commit into
Closed
[SPARK-56661] Addressing review comments from PR #55768#56367sven-weber-db wants to merge 1 commit into
sven-weber-db wants to merge 1 commit into
Conversation
haiyangsun-db
approved these changes
Jun 8, 2026
asf-gitbox-commits
pushed a commit
that referenced
this pull request
Jun 8, 2026
### What changes were proposed in this pull request? This change addresses the open review comments from [pull request #55768](#55768). In summary, the following changes were made: Correctness fixes (2) 1. SparkEnv.scala:161 — The created UDFDispatcherManager is now stored back into udfDispatcherManager = Some(created), so the cache works and stop() properly closes dispatchers. 2. ExternalUDFPlanner.scala + logical/physical nodes + strategy — profile: Option[ResourceProfile] is now threaded through MapPartitionsExternalUDF (logical), MapPartitionsExternalUDFExec (physical), SparkStrategies, and UnifiedExternalUDFPlanner, so a ResourceProfile passed to mapInPandas is no longer silently dropped. Nits (5) 1. ExternalUDFExec.scala:65 — Reworded "CAN but MUST NOT cancel or close" → "may use the session but MUST NOT cancel or close it" 2. MapPartitionsExternalUDFExec.scala:39-42 — Fixed stale Scaladoc: functionExpr → function, removed non-existent resultAttributes 3. UDFDispatcherManager.scala:33 — [[stop]] → [[close]] 4. UDFDispatcherManager.scala:49 — "write lock is used by stop" → "close" 5. UDFDispatcherManager.scala:66 — Removed duplicate "quick path" comment ### Why are the changes needed? They were requested in a review of the above linked PR. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Linting & re-running existing tests. Mostly nit changes. ### Was this patch authored or co-authored using generative AI tooling? Yes Closes #56367 from sven-weber-db/sven-weber_data/SPARK-56661. Authored-by: Sven Weber <sven.weber@databricks.com> Signed-off-by: Herman van Hövell <herman@databricks.com> (cherry picked from commit 1592ec2) Signed-off-by: Herman van Hövell <herman@databricks.com>
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?
This change addresses the open review comments from pull request #55768. In summary, the following changes were made:
Correctness fixes (2)
Some(created), so the cache works and stop() properly closes dispatchers.
threaded through MapPartitionsExternalUDF (logical), MapPartitionsExternalUDFExec (physical),
SparkStrategies, and UnifiedExternalUDFPlanner, so a ResourceProfile passed to mapInPandas is no longer
silently dropped.
Nits (5)
NOT cancel or close it"
non-existent resultAttributes
Why are the changes needed?
They were requested in a review of the above linked PR.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Linting & re-running existing tests. Mostly nit changes.
Was this patch authored or co-authored using generative AI tooling?
Yes