Skip to content

[SPARK-47862][PYTHON][CONNECT]Fix generation of proto files#46068

Closed
grundprinzip wants to merge 3 commits intoapache:masterfrom
grundprinzip:SPARK-47862
Closed

[SPARK-47862][PYTHON][CONNECT]Fix generation of proto files#46068
grundprinzip wants to merge 3 commits intoapache:masterfrom
grundprinzip:SPARK-47862

Conversation

@grundprinzip
Copy link
Copy Markdown
Contributor

@grundprinzip grundprinzip commented Apr 15, 2024

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 fail

Why 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

Copy link
Copy Markdown
Contributor

@hvanhovell hvanhovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HyukjinKwon
Copy link
Copy Markdown
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants