Skip to content

[SPARK-53970][PYTHON] Remove incorrect 'optional' tag for messageName…#54797

Closed
volcano-mite wants to merge 1 commit intoapache:masterfrom
volcano-mite:SPARK-53970
Closed

[SPARK-53970][PYTHON] Remove incorrect 'optional' tag for messageName…#54797
volcano-mite wants to merge 1 commit intoapache:masterfrom
volcano-mite:SPARK-53970

Conversation

@volcano-mite
Copy link

What changes were proposed in this pull request?

This PR fixes a minor documentation inconsistency in pyspark/sql/protobuf/functions.py. It removes the optional tag from the messageName parameter in the docstrings of both the from_protobuf and to_protobuf functions.

Why are the changes needed?

As reported in SPARK-53970, the function signatures define messageName as a required positional argument (it has no default value). However, the docstrings incorrectly labeled it as optional. This mismatch could mislead developers into thinking they can omit the argument, which would result in a TypeError. Updating the docstring ensures it accurately reflects the code's behavior.

Does this PR introduce any user-facing change?

No. This is a documentation-only fix.

How was this patch tested?

Manual review of the docstring changes. Passed local Python linter checks (./dev/lint-python) to ensure no style regressions.

Was this patch authored or co-authored using generative AI tooling?

No.

@HyukjinKwon
Copy link
Member

Merged to master.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants