[SPARK-47862][PYTHON][CONNECT]Fix generation of proto files#46068
Closed
grundprinzip wants to merge 3 commits intoapache:masterfrom
Closed
[SPARK-47862][PYTHON][CONNECT]Fix generation of proto files#46068grundprinzip wants to merge 3 commits intoapache:masterfrom
grundprinzip wants to merge 3 commits intoapache:masterfrom
Conversation
HyukjinKwon
reviewed
Apr 16, 2024
HyukjinKwon
approved these changes
Apr 16, 2024
grundprinzip
commented
Apr 16, 2024
Member
|
Merged to master. |
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?
When Spark Connect generates the protobuf files, we move them to the correct folder and adjust the package imports. However, we did not properly adjust the module name of the serialized descriptor. This in turn breaks serialization of the descriptors using Cloudpickle.
The default
__reduce__method of the generated proto message uses the descriptor module and the serialize to string method to generate a proper binary representation. However, since the module was previously wrongly encoded, serialization would failWhy are the changes needed?
Compatibility
Does this PR introduce any user-facing change?
No
How was this patch tested?
Manual
Was this patch authored or co-authored using generative AI tooling?
No