xinrong-meng opened a new pull request, #44194:
URL: https://github.com/apache/spark/pull/44194

   ### What changes were proposed in this pull request?
   Validate startup urls with the config being set, see example in the "Does 
this PR introduce _any_ user-facing change".
   
   
   ### Why are the changes needed?
   Clear and user-friendly error messages.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   
   FROM
   ```py
   >>> SparkSession.builder.config(map={"spark.master": "x", "spark.remote": 
"y"})
   <pyspark.sql.session.SparkSession.Builder object at 0x7fa310115b20
   
   >>> SparkSession.builder.config(map={"spark.master": "x", "spark.remote": 
"y"}).config("x", "z")  # Only raises the error when adding new configs
   Traceback (most recent call last):
   ...
   RuntimeError: Spark master cannot be configured with Spark Connect server; 
however, found URL for Spark Connect [y]
   ```
   
   TO
   ```py
   >>> SparkSession.builder.config(map={"spark.master": "x", "spark.remote": 
"y"})
   Traceback (most recent call last):
   ...
   RuntimeError: Spark master cannot be configured with Spark Connect server; 
however, found URL for Spark Connect [y]
   ```
   
   ### How was this patch tested?
   Unit tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


-- 
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