spark
spark copied to clipboard
[SPARK-46961][SS] Using ProcessorContext to store and retrieve handle
What changes were proposed in this pull request?
Setting the processorHandle as a part of the statefulProcessor, so that the user doesn't have to explicitly keep track of it, and can instead simply call getStatefulProcessorHandle
Why are the changes needed?
This enhances the usability of the State API
Does this PR introduce any user-facing change?
Yes, this is an API change. This enhances usability of the StatefulProcessorHandle and the TransformWithState operator.
How was this patch tested?
Existing unit tests are sufficient
Was this patch authored or co-authored using generative AI tooling?
No