[SPARK-56468][UDF] Validate required worker capabilities in direct dispatcher#55906
Open
RaghunandanKumar wants to merge 1 commit into
Open
[SPARK-56468][UDF] Validate required worker capabilities in direct dispatcher#55906RaghunandanKumar wants to merge 1 commit into
RaghunandanKumar wants to merge 1 commit into
Conversation
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 PR tightens
DirectWorkerDispatchervalidation for the new language-agnostic UDF worker specification.Specifically, it now rejects direct worker specs that:
UNSPECIFIEDenum values in supported data formats or communication patternsARROWBIDIRECTIONAL_STREAMINGThe existing
DirectWorkerDispatcherSuitefixtures are updated to include explicit capabilities where they were previously constructing minimal specs, and new focused tests cover the new validation paths.Why are the changes needed?
SPARK-56468is an audit task for the UDF gRPC / worker protocol before the Spark 4.2 protocol boundary hardens.The protobuf comments already describe these capability fields as required, but the direct dispatcher previously accepted incomplete specs and deferred that inconsistency into later runtime paths. Failing closed here keeps the worker spec self-contained and prevents silently invalid protocol definitions from being treated as usable.
Does this PR introduce any user-facing change?
No. The UDF worker framework is still experimental and not yet wired into user-facing execution paths.
How was this patch tested?
Locally on macOS with Homebrew OpenJDK 17:
Passed:
DirectWorkerDispatcherSuite(33 tests)Was this patch authored or co-authored using generative AI tooling?
Yes.