viirya commented on code in PR #36161:
URL: https://github.com/apache/spark/pull/36161#discussion_r850009104
##########
python/pyspark/sql/session.py:
##########
@@ -247,13 +280,19 @@ def getOrCreate(self) -> "SparkSession":
>>> s1.conf.get("k1") == "v1"
True
+ The configuration of the SparkSession can be changed afterwards
+
+ >>> s1.conf.set("k1", "v1_new")
+ >>> s1.conf.get("k1") == "v1_new"
+ True
+
In case an existing SparkSession is returned, the config options
specified
in this builder will be applied to the existing SparkSession.
>>> s2 = SparkSession.builder.config("k2", "v2").getOrCreate()
- >>> s1.conf.get("k1") == s2.conf.get("k1")
+ >>> s1.conf.get("k1") == s2.conf.get("k1") == "v1_new"
Review Comment:
👍
--
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]