uros-b opened a new pull request, #58180:
URL: https://github.com/apache/spark/pull/58180

   ### What changes were proposed in this pull request?
   
   Fixes a misspelled keyword argument in a `PySparkValueError` raised by the 
Spark Connect Python client. In `python/pyspark/sql/connect/client/core.py`, 
the error for a `None` tag was constructed with `message_paramters=` instead of 
`messageParameters=`.
   
   ### Why are the changes needed?
   
   `PySparkValueError.__init__` (`pyspark/errors/exceptions/base.py`) accepts 
`messageParameters` and does not accept `**kwargs`. As a result, when the tag 
validation hits the `None` case it raises `TypeError: __init__() got an 
unexpected keyword argument 'message_paramters'` instead of the intended 
`CANNOT_BE_NONE` error. This is a latent bug on the error path.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Passing `None` where a Spark Connect tag is required now raises the 
intended `PySparkValueError` (`CANNOT_BE_NONE`) with its message, instead of a 
confusing `TypeError`.
   
   ### How was this patch tested?
   
   The keyword is corrected to match the `PySparkValueError` constructor 
parameter. The affected path was previously unexercised, which is why the typo 
went unnoticed; I can add a regression test asserting `PySparkValueError` is 
raised for a `None` tag if preferred.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to